diff --git a/Dockerfile b/Dockerfile index 1cb3286..ac24dd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ -FROM alpine +FROM alpine:latest LABEL maintainer "Knut Ahlers " -ENV VAULT_VERSION 0.10.1 -ENV VAULT_HASH 031e521b4603487126fd353a9557dd22a02304a8a11f843e9914be59a8009c8a +ENV VAULT_VERSION=0.10.1 \ + VAULT_HASH=031e521b4603487126fd353a9557dd22a02304a8a11f843e9914be59a8009c8a \ + HOME=/home/vault RUN set -xe \ && apk --no-cache add curl ca-certificates \ - && curl -sSLfo /tmp/vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip \ + && curl -sSLfo /tmp/vault.zip "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" \ && echo "${VAULT_HASH} /tmp/vault.zip" | sha256sum -c \ && mkdir -p /opt/vault \ && unzip /tmp/vault.zip -d /opt/vault && rm /tmp/vault.zip \ diff --git a/update-version.sh b/update-version.sh index 461ced0..c66634b 100755 --- a/update-version.sh +++ b/update-version.sh @@ -21,8 +21,8 @@ echo "Testing availability of archive 'vault_${LATEST}_linux_amd64.zip'..." curl -sSLIfo /dev/null https://releases.hashicorp.com/vault/${LATEST}/vault_${LATEST}_linux_amd64.zip echo "Found version ${LATEST}, patching..." -sed -i "s/ENV VAULT_VERSION .*$/ENV VAULT_VERSION ${LATEST}/" Dockerfile -sed -i "s/ENV VAULT_HASH .*$/ENV VAULT_HASH ${SHASUM}/" Dockerfile +sed -i -E "s/VAULT_VERSION=[^ ]*/VAULT_VERSION=${LATEST}/" Dockerfile +sed -i -E "s/VAULT_HASH=[^ ]*/VAULT_HASH=${SHASUM}/" Dockerfile echo "Checking for changes..." git diff --exit-code && exit 0