Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterise repository reference in Dockerfile #790

Open
wants to merge 1 commit 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
5 changes: 3 additions & 2 deletions pkg/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ RUN set -eux; \
gosu --version; \
gosu nobody true
# build KeyDB
ARG BRANCH
ARG REPO=https://github.com/Snapchat/KeyDB.git
ARG BRANCH=main
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -47,7 +48,7 @@ RUN set -eux; \
libsnappy-dev \
libssl-dev \
git; \
cd /tmp && git clone --branch $BRANCH https://github.com/Snapchat/KeyDB.git --recursive; \
cd /tmp && git clone --branch $BRANCH $REPO --recursive; \
cd /tmp/KeyDB; \
# disable protected mode as it relates to docker
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \
Expand Down
5 changes: 3 additions & 2 deletions pkg/docker/Dockerfile_Alpine
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM alpine:3.18
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN addgroup -S -g 1000 keydb && adduser -S -G keydb -u 999 keydb
RUN mkdir -p /etc/keydb
ARG BRANCH
ARG REPO=https://github.com/Snapchat/KeyDB.git
ARG BRANCH=main
RUN set -eux; \
\
apk add --no-cache su-exec tini; \
Expand All @@ -26,7 +27,7 @@ RUN set -eux; \
lz4-dev \
snappy-dev \
; \
cd /tmp && git clone --branch $BRANCH https://github.com/Snapchat/KeyDB.git --recursive; \
cd /tmp && git clone --branch $BRANCH $REPO --recursive; \
cd /tmp/KeyDB; \
# disable protected mode as it relates to docker
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \
Expand Down
Loading