Skip to content

Instantly share code, notes, and snippets.

@valeriansaliou
Last active September 8, 2024 07:38
Show Gist options
  • Save valeriansaliou/62ecee415079465b31500f25a5dfea0c to your computer and use it in GitHub Desktop.
Save valeriansaliou/62ecee415079465b31500f25a5dfea0c to your computer and use it in GitHub Desktop.
Dockerfile: Certbot with Nomad
ARG CERTBOT_VERSION=2.11.0
FROM certbot/certbot:v${CERTBOT_VERSION}
ARG NOMAD_VERSION=1.5.8-r4
RUN apk add --no-cache nomad=${NOMAD_VERSION}
ENTRYPOINT ["certbot"]
@valeriansaliou
Copy link
Author

valeriansaliou commented Sep 8, 2024

Build and push from macOS (cross platform):

docker buildx build \
  --push \
  --platform linux/amd64,linux/arm64 \
  --tag valeriansaliou/certbot-with-nomad:v2.11.0-v1.5.8 \
  .

First version in tag is the certbot version, second is the nomad version.

To build multiple images from macOS, see: https://gist.github.com/brianjbayer/d80f60fc6084e77e049f0bb442449519

@valeriansaliou
Copy link
Author

valeriansaliou commented Sep 8, 2024

Change build versions:

docker build --build-arg NOMAD_VERSION=1.5.8-r4 .
docker build --build-arg CERTBOT_VERSION=2.11.0 .

@valeriansaliou
Copy link
Author

To run a test container locally:

docker run -it --rm --entrypoint /bin/sh [image_id]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment