docker-images/images/redis/Dockerfile

28 lines
842 B
Docker
Raw Normal View History

2020-12-03 00:32:17 +00:00
ARG REPO_LOCATION
# ARG BASE_VERSION=something
FROM ${REPO_LOCATION}minideb AS builder
2020-12-03 01:16:31 +00:00
RUN install_packages curl ca-certificates make gcc libc-dev libjemalloc-dev
2020-12-03 00:32:17 +00:00
RUN curl -L -o /tmp/redis-stable.tar.gz https://download.redis.io/redis-stable.tar.gz
RUN tar -xf /tmp/redis-stable.tar.gz -C /srv
WORKDIR /srv/redis-stable
RUN make distclean && make -j$(nproc) && make test -j$(nproc)
###############################################################################
FROM ${REPO_LOCATION}minideb
COPY --from=builder /srv/redis-stable/src/redis-server /usr/local/bin
COPY --from=builder /srv/redis-stable/src/redis-cli /usr/local/bin
COPY --from=builder /srv/redis-stable/src/redis-sentinel /usr/local/bin
# COPY --from=builder /srv/redis-stable/src/redis-benchmark /usr/local/bin
USER 2100:2100
ENTRYPOINT [ "/usr/local/redis-server" ]