Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored May 22, 2024
1 parent 0b0dc4a commit c8bc58c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ RUN apk upgrade --no-cache -a && \
make -j "$(nproc)" LDFLAGS="-s -w -static" CFLAGS="-static" USE_SYSTEMD=no BUILD_TLS=no

FROM alpine:3.20.0
COPY --from=build /src/src/valkey-cli /usr/local/bin/valkey-cli
COPY --from=build /src/src/valkey-server /usr/local/bin/valkey-server
RUN apk upgrade --no-cache -a && \
apk add --no-cache ca-certificates tzdata tini && \
valkey-server -v
valkey-cli --version && \
valkey-server --version && \
addgroup -S -g 1000 redis && \
adduser -S -G redis -u 999 redis && \
mkdir /data && chown redis:redis /data && \
ln -s /usr/local/bin/valkey-cli /usr/local/bin/redis-cli && \
ln -s /usr/local/bin/valkey-server /usr/local/bin/redis-server

VOLUME /data
WORKDIR /data
USER redis:redis

ENTRYPOINT ["tini", "--", "valkey-server", "--protected-mode", "no", "--loglevel", "notice"]
EXPOSE 6379/tcp

0 comments on commit c8bc58c

Please sign in to comment.