Skip to content

Instantly share code, notes, and snippets.

@twyle
Created June 23, 2022 10:45
Show Gist options
  • Save twyle/2c60fffc6237e880dace75d0d871f6bb to your computer and use it in GitHub Desktop.
Save twyle/2c60fffc6237e880dace75d0d871f6bb to your computer and use it in GitHub Desktop.
# base image
FROM alpine:3.14
# set vault version
ENV VAULT_VERSION 1.8.2
# create a new directory
RUN mkdir /vault
# download dependencies
RUN apk --no-cache add \
bash \
ca-certificates \
wget
# download and set up vault
RUN wget --quiet --output-document=/tmp/vault.zip https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip && \
unzip /tmp/vault.zip -d /vault && \
rm -f /tmp/vault.zip && \
chmod +x /vault
# update PATH
ENV PATH="PATH=$PATH:$PWD/vault"
# add the config file
COPY ./config/vault-config.json /vault/config/vault-config.json
# expose port 8200
EXPOSE 8200
# run vault
ENTRYPOINT ["vault"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment