Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions secure-stack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ services:
restart: unless-stopped

cert-dumper:
image: ldez/traefik-certs-dumper:latest
image: alpine:3.18
container_name: dms-cert-dumper
command: file --version v2 --watch --source /traefik/acme.json --dest /ssl --post-hook "docker exec dms-core postfix reload && docker exec dms-core dovecot reload"
entrypoint: /bin/sh -c 'apk add --no-cache docker-cli curl && curl -L https://github.com/ldez/traefik-certs-dumper/releases/download/v2.10.0/traefik-certs-dumper_v2.10.0_linux_amd64.tar.gz | tar xz && mv traefik-certs-dumper /usr/bin/ && traefik-certs-dumper file --version v2 --watch --source /traefik/acme.json --dest /ssl --post-hook "docker exec dms-core postfix reload && docker exec dms-core dovecot reload"'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The current entrypoint implementation introduces several issues:

  1. Security & Reliability: Downloading a binary at runtime without checksum verification is a security risk. It also makes container startup dependent on external network and repository availability.
  2. Architecture Lock-in: Hardcoding the amd64 binary URL breaks support for other architectures (e.g., ARM64). The original image was multi-arch.
  3. Signal Handling: The final command should use exec so that traefik-certs-dumper runs as PID 1 and correctly handles termination signals (SIGTERM).

Recommendation: Use a Dockerfile to build a custom image. This is the standard way to add dependencies like docker-cli while maintaining immutability and security. If you must use this inline approach, at least add exec to the final command to ensure proper signal propagation.

    entrypoint: /bin/sh -c 'apk add --no-cache docker-cli curl && curl -L https://github.com/ldez/traefik-certs-dumper/releases/download/v2.10.0/traefik-certs-dumper_v2.10.0_linux_amd64.tar.gz | tar xz && mv traefik-certs-dumper /usr/bin/ && exec traefik-certs-dumper file --version v2 --watch --source /traefik/acme.json --dest /ssl --post-hook "docker exec dms-core postfix reload && docker exec dms-core dovecot reload"'

volumes:
- ./traefik-data:/traefik:ro
- ./dms/ssl:/ssl
Expand Down