From 18e07b368833ba8692dc6412ccd2ee762d8256b3 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 3 Dec 2020 00:32:17 +0000 Subject: [PATCH] redis: add Dockerfile --- README.md | 1 + images/redis/Dockerfile | 27 +++++++++++++++++++++++++++ images/redis/type.txt | 1 + 3 files changed, 29 insertions(+) create mode 100644 images/redis/Dockerfile create mode 100644 images/redis/type.txt diff --git a/README.md b/README.md index 772f818..13b261d 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,4 @@ UID | GID | Container | Notes 80 | 80 | serve | Static HTTP Server based on Node.js 90 | 90 | jellyfin | 999 | 994 | certbot | The same user & group as fabio, because file permissions +2100 | 2100 | redis | diff --git a/images/redis/Dockerfile b/images/redis/Dockerfile new file mode 100644 index 0000000..c415a15 --- /dev/null +++ b/images/redis/Dockerfile @@ -0,0 +1,27 @@ +ARG REPO_LOCATION +# ARG BASE_VERSION=something + +FROM ${REPO_LOCATION}minideb AS builder + +RUN install_packages curl ca-certificates libjemalloc-dev + +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" ] diff --git a/images/redis/type.txt b/images/redis/type.txt new file mode 100644 index 0000000..bdb9670 --- /dev/null +++ b/images/redis/type.txt @@ -0,0 +1 @@ +docker