mirror of
https://github.com/luzifer-docker/vault.git
synced 2024-11-08 12:50:00 +00:00
Improve Dockerfile
This commit is contained in:
parent
456805c249
commit
29c6c77217
2 changed files with 7 additions and 6 deletions
|
@ -1,13 +1,14 @@
|
|||
FROM alpine
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL maintainer "Knut Ahlers <knut@luzifer.io>"
|
||||
|
||||
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 \
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue