Created
November 12, 2022 08:47
-
-
Save erangaeb/10cec40cba83a7f86fa401c1be02feba to your computer and use it in GitHub Desktop.
dockerize vault with filesystem backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 \ | |
curl | |
# 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