Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Make the entrypoint extensible #59

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 0.X/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN addgroup vault && \
adduser -S -G vault vault

# Set up certificates, our base tools, and Vault.
RUN apk add --no-cache ca-certificates gnupg openssl libcap su-exec dumb-init && \
RUN apk add --no-cache ca-certificates gnupg openssl libcap su-exec dumb-init run-parts && \
gpg --keyserver pgp.mit.edu --recv-keys 91A6E7F85D05C65630BEF18951852D87348FFC4C && \
mkdir -p /tmp/build && \
cd /tmp/build && \
Expand Down Expand Up @@ -53,6 +53,7 @@ EXPOSE 8200
# For production derivatives of this container, you shoud add the IPC_LOCK
# capability so that Vault can mlock memory.
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ONBUILD COPY /docker-entrypoint.d/* /docker-entrypoint.d/
ENTRYPOINT ["docker-entrypoint.sh"]

# By default you'll get a single-node development server that stores everything
Expand Down
5 changes: 5 additions & 0 deletions 0.X/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ if [ "$1" = 'vault' ]; then
fi
fi

DIR=/docker-entrypoint.d
if [ -d "$DIR" ]; then
/usr/bin/run-parts --verbose "$DIR"
fi

exec "$@"