Skip to content

Commit

Permalink
Add ACMESH_VERSION build arg to the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed Nov 29, 2020
1 parent 10e8662 commit 7a787c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ FROM alpine:3.12
LABEL maintainer="Nicolas Duchon <[email protected]> (@buchdag)"

ARG GIT_DESCRIBE
ARG ACMESH_VERSION=2.8.7

ENV COMPANION_VERSION=$GIT_DESCRIBE \
DOCKER_HOST=unix:///var/run/docker.sock \
PATH=$PATH:/app
Expand Down
7 changes: 4 additions & 3 deletions install_acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ set -e
# Install git (required to fetch acme.sh)
apk --no-cache --virtual .acmesh-deps add git

# Get acme.sh Let's Encrypt client source
tag="2.8.7"
# Get acme.sh ACME client source
mkdir /src
git -C /src clone https://github.com/Neilpang/acme.sh.git
cd /src/acme.sh
git checkout "$tag"
if [[ "$ACMESH_VERSION" != "master" ]]; then
git -c advice.detachedHead=false checkout "$ACMESH_VERSION"
fi

# Install acme.sh in /app
./acme.sh --install \
Expand Down

0 comments on commit 7a787c7

Please sign in to comment.