Skip to content

Commit

Permalink
fix(certs): remove certs from client docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Jun 10, 2024
1 parent c43718f commit 8997490
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 12 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ services:
image: ghcr.io/opiproject/opi-sztp-server:main
build:
context: sztp-server
depends_on:
bootstrap:
condition: service_healthy
volumes:
- server-certs:/certs/server
- client-certs:/certs/client
Expand Down Expand Up @@ -147,12 +150,20 @@ services:
condition: service_healthy
redirecter:
condition: service_healthy
setup-cert:
condition: service_completed_successfully
volumes:
- client-certs:/certs
- dhcp-leases-folder:/var/lib/dhclient/
- /etc/os-release:/etc/os-release
networks:
- opi
command: ['/opi-sztp-agent', 'daemon']
command: |
/opi-sztp-agent daemon \
--bootstrap-trust-anchor-cert /certs/opi.pem \
--device-end-entity-cert /certs/opi_cert.pem \
--device-private-key /certs/opi_private_key.pem \
--serial-number nvidia-serial-number
avahi:
image: docker.io/flungo/avahi:latest
Expand Down
7 changes: 0 additions & 7 deletions sztp-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,5 @@ RUN apk add --no-cache --no-check-certificate curl && rm -rf /var/cache/apk/*
COPY ./*.json /tmp/
# hadolint ignore=DL3022
COPY --from=builder /opi-sztp-agent /
# hadolint ignore=DL3022
COPY --from=ghcr.io/opiproject/opi-sztp-server:main /opi.pem /certs/
# hadolint ignore=DL3022
COPY --from=ghcr.io/opiproject/opi-sztp-server:main /tmp/sztpd-simulator/pki/client/end-entity/my_cert.pem /certs/
# hadolint ignore=DL3022
COPY --from=ghcr.io/opiproject/opi-sztp-server:main /tmp/sztpd-simulator/pki/client/end-entity/private_key.pem /certs/
# TODO: consider generating iDevID certificates using https://github.com/usnistgov/iDevIDCerts

CMD [ "/opi-sztp-agent" ]

0 comments on commit 8997490

Please sign in to comment.