Skip to content

Commit b6d413c

Browse files
committed
Add TLS support in 6.0+ and unify templates slightly more
1 parent 1e3c60f commit b6d413c

File tree

13 files changed

+96
-145
lines changed

13 files changed

+96
-145
lines changed

4.0/32bit/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ RUN set -eux; \
3939
gosu --version; \
4040
gosu nobody true
4141

42-
RUN set -eux; \
43-
apt-get update; \
44-
apt-get install -y --no-install-recommends libc6-i386; \
45-
rm -rf /var/lib/apt/lists/*
46-
4742
ENV REDIS_VERSION 4.0.14
4843
ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-4.0.14.tar.gz
4944
ENV REDIS_DOWNLOAD_SHA 1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a087587e93a7
@@ -57,8 +52,7 @@ RUN set -eux; \
5752
wget \
5853
\
5954
gcc \
60-
gcc-multilib \
61-
libc6-dev-i386 \
55+
libc6-dev-i386 gcc-multilib \
6256
make \
6357
; \
6458
rm -rf /var/lib/apt/lists/*; \
@@ -97,6 +91,14 @@ RUN set -eux; \
9791
\
9892
apt-mark auto '.*' > /dev/null; \
9993
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
94+
find /usr/local -type f -executable -exec ldd '{}' ';' \
95+
| awk '/=>/ { print $(NF-1) }' \
96+
| sort -u \
97+
| xargs -r dpkg-query --search \
98+
| cut -d: -f1 \
99+
| sort -u \
100+
| xargs -r apt-mark manual \
101+
; \
100102
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
101103
\
102104
redis-cli --version; \

4.0/Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN set -eux; \
7373
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
7474
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
7575
\
76-
make -C /usr/src/redis -j "$(nproc)"; \
76+
make -C /usr/src/redis -j "$(nproc)" all; \
7777
make -C /usr/src/redis install; \
7878
\
7979
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)
@@ -91,6 +91,14 @@ RUN set -eux; \
9191
\
9292
apt-mark auto '.*' > /dev/null; \
9393
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
94+
find /usr/local -type f -executable -exec ldd '{}' ';' \
95+
| awk '/=>/ { print $(NF-1) }' \
96+
| sort -u \
97+
| xargs -r dpkg-query --search \
98+
| cut -d: -f1 \
99+
| sort -u \
100+
| xargs -r apt-mark manual \
101+
; \
94102
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
95103
\
96104
redis-cli --version; \

4.0/alpine/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN set -eux; \
2222
linux-headers \
2323
make \
2424
musl-dev \
25+
openssl-dev \
2526
; \
2627
\
2728
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"; \
@@ -40,7 +41,7 @@ RUN set -eux; \
4041
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
4142
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
4243
\
43-
make -C /usr/src/redis -j "$(nproc)"; \
44+
make -C /usr/src/redis -j "$(nproc)" all; \
4445
make -C /usr/src/redis install; \
4546
\
4647
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)

5.0/32bit/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ RUN set -eux; \
3939
gosu --version; \
4040
gosu nobody true
4141

42-
RUN set -eux; \
43-
apt-get update; \
44-
apt-get install -y --no-install-recommends libc6-i386; \
45-
rm -rf /var/lib/apt/lists/*
46-
4742
ENV REDIS_VERSION 5.0.7
4843
ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-5.0.7.tar.gz
4944
ENV REDIS_DOWNLOAD_SHA 61db74eabf6801f057fd24b590232f2f337d422280fd19486eca03be87d3a82b
@@ -57,8 +52,7 @@ RUN set -eux; \
5752
wget \
5853
\
5954
gcc \
60-
gcc-multilib \
61-
libc6-dev-i386 \
55+
libc6-dev-i386 gcc-multilib \
6256
make \
6357
; \
6458
rm -rf /var/lib/apt/lists/*; \
@@ -97,6 +91,14 @@ RUN set -eux; \
9791
\
9892
apt-mark auto '.*' > /dev/null; \
9993
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
94+
find /usr/local -type f -executable -exec ldd '{}' ';' \
95+
| awk '/=>/ { print $(NF-1) }' \
96+
| sort -u \
97+
| xargs -r dpkg-query --search \
98+
| cut -d: -f1 \
99+
| sort -u \
100+
| xargs -r apt-mark manual \
101+
; \
100102
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
101103
\
102104
redis-cli --version; \

5.0/Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN set -eux; \
7373
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
7474
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
7575
\
76-
make -C /usr/src/redis -j "$(nproc)"; \
76+
make -C /usr/src/redis -j "$(nproc)" all; \
7777
make -C /usr/src/redis install; \
7878
\
7979
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)
@@ -91,6 +91,14 @@ RUN set -eux; \
9191
\
9292
apt-mark auto '.*' > /dev/null; \
9393
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
94+
find /usr/local -type f -executable -exec ldd '{}' ';' \
95+
| awk '/=>/ { print $(NF-1) }' \
96+
| sort -u \
97+
| xargs -r dpkg-query --search \
98+
| cut -d: -f1 \
99+
| sort -u \
100+
| xargs -r apt-mark manual \
101+
; \
94102
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
95103
\
96104
redis-cli --version; \

5.0/alpine/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN set -eux; \
2222
linux-headers \
2323
make \
2424
musl-dev \
25+
openssl-dev \
2526
; \
2627
\
2728
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"; \
@@ -40,7 +41,7 @@ RUN set -eux; \
4041
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
4142
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
4243
\
43-
make -C /usr/src/redis -j "$(nproc)"; \
44+
make -C /usr/src/redis -j "$(nproc)" all; \
4445
make -C /usr/src/redis install; \
4546
\
4647
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)

6.0-rc/32bit/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ RUN set -eux; \
3939
gosu --version; \
4040
gosu nobody true
4141

42-
RUN set -eux; \
43-
apt-get update; \
44-
apt-get install -y --no-install-recommends libc6-i386; \
45-
rm -rf /var/lib/apt/lists/*
46-
4742
ENV REDIS_VERSION 6.0-rc1
4843
ENV REDIS_DOWNLOAD_URL https://github.com/antirez/redis/archive/6.0-rc1.tar.gz
4944
ENV REDIS_DOWNLOAD_SHA 2676012e2fcfe8d41e594b2ae8a05d0a050d2d84c38a0471ae5fe0143e4b0eca
@@ -57,8 +52,7 @@ RUN set -eux; \
5752
wget \
5853
\
5954
gcc \
60-
gcc-multilib \
61-
libc6-dev-i386 \
55+
libc6-dev-i386 gcc-multilib \
6256
make \
6357
; \
6458
rm -rf /var/lib/apt/lists/*; \
@@ -97,6 +91,14 @@ RUN set -eux; \
9791
\
9892
apt-mark auto '.*' > /dev/null; \
9993
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
94+
find /usr/local -type f -executable -exec ldd '{}' ';' \
95+
| awk '/=>/ { print $(NF-1) }' \
96+
| sort -u \
97+
| xargs -r dpkg-query --search \
98+
| cut -d: -f1 \
99+
| sort -u \
100+
| xargs -r apt-mark manual \
101+
; \
100102
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
101103
\
102104
redis-cli --version; \

6.0-rc/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ RUN set -eux; \
5353
\
5454
gcc \
5555
libc6-dev \
56+
libssl-dev \
5657
make \
5758
; \
5859
rm -rf /var/lib/apt/lists/*; \
@@ -73,7 +74,8 @@ RUN set -eux; \
7374
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
7475
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
7576
\
76-
make -C /usr/src/redis -j "$(nproc)"; \
77+
export BUILD_TLS=yes; \
78+
make -C /usr/src/redis -j "$(nproc)" all; \
7779
make -C /usr/src/redis install; \
7880
\
7981
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)
@@ -91,6 +93,14 @@ RUN set -eux; \
9193
\
9294
apt-mark auto '.*' > /dev/null; \
9395
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
96+
find /usr/local -type f -executable -exec ldd '{}' ';' \
97+
| awk '/=>/ { print $(NF-1) }' \
98+
| sort -u \
99+
| xargs -r dpkg-query --search \
100+
| cut -d: -f1 \
101+
| sort -u \
102+
| xargs -r apt-mark manual \
103+
; \
94104
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
95105
\
96106
redis-cli --version; \

6.0-rc/alpine/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN set -eux; \
2222
linux-headers \
2323
make \
2424
musl-dev \
25+
openssl-dev \
2526
; \
2627
\
2728
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"; \
@@ -40,7 +41,8 @@ RUN set -eux; \
4041
# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
4142
# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
4243
\
43-
make -C /usr/src/redis -j "$(nproc)"; \
44+
export BUILD_TLS=yes; \
45+
make -C /usr/src/redis -j "$(nproc)" all; \
4446
make -C /usr/src/redis install; \
4547
\
4648
# TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)

Dockerfile-32bit.template

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)