1
0
Fork 0

Add ACMESH_VERSION build arg to the Dockerfile

This commit is contained in:
Nicolas Duchon 2020-11-17 23:06:14 +01:00
parent 10e866210d
commit 7a787c7700
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7
2 changed files with 6 additions and 3 deletions

View File

@ -24,6 +24,8 @@ FROM alpine:3.12
LABEL maintainer="Nicolas Duchon <nicolas.duchon@gmail.com> (@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

View File

@ -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 \