Skip to content

Conversation

@tianon
Copy link
Contributor

@tianon tianon commented Dec 27, 2019

The only wrinkle was the protected-mode changes for 6.0+, but I handled them similar to what we do in PHP for multiple variants off the same template.

cc @J0WI

Closes #214

@tianon tianon requested a review from yosifkit December 27, 2019 20:59
@J0WI
Copy link
Contributor

J0WI commented Dec 27, 2019

The diff between Dockerfile.template and Dockerfile-32bit.template seems to be trivial, isn't it?

The only wrinkle was the protected-mode changes for 6.0+, but I handled them similar to what we do in PHP for multiple variants off the same template.
@tianon
Copy link
Contributor Author

tianon commented Dec 28, 2019

They're very similar, but IMO just different enough that I think having two templates that we vimdiff/meld vs some sed monstrosity is easier to maintain:

$ diff -u Dockerfile.template Dockerfile-32bit.template
--- Dockerfile.template	2019-12-27 16:35:33.843311801 -0800
+++ Dockerfile-32bit.template	2019-12-27 16:37:05.020816514 -0800
@@ -39,6 +39,11 @@
 	gosu --version; \
 	gosu nobody true
 
+RUN set -eux; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends libc6-i386; \
+	rm -rf /var/lib/apt/lists/*
+
 ENV REDIS_VERSION placeholder
 ENV REDIS_DOWNLOAD_URL placeholder
 ENV REDIS_DOWNLOAD_SHA placeholder
@@ -52,7 +57,8 @@
 		wget \
 		\
 		gcc \
-		libc6-dev \
+		gcc-multilib \
+		libc6-dev-i386 \
 		make \
 	; \
 	rm -rf /var/lib/apt/lists/*; \
@@ -75,7 +81,7 @@
 # see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840
 # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
 	\
-	make -C /usr/src/redis -j "$(nproc)"; \
+	make -C /usr/src/redis -j "$(nproc)" 32bit; \
 	make -C /usr/src/redis install; \
 	\
 # TODO https://github.com/antirez/redis/pull/3494 (deduplicate "redis-server" copies)

@tianon tianon merged commit 1e3c60f into redis:master Dec 30, 2019
@tianon tianon deleted the templates branch December 30, 2019 21:25
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 30, 2019
Changes:

- redis/docker-library-redis@1e3c60f: Merge pull request redis/docker-library-redis#216 from infosiftr/templates
- redis/docker-library-redis@d875ae0: Add initial templating
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Jan 1, 2020
Changes:

- redis/docker-library-redis@0ed98d3: Merge pull request redis/docker-library-redis#218 from infosiftr/tls
- redis/docker-library-redis@b6d413c: Add TLS support in 6.0+ and unify templates slightly more
- redis/docker-library-redis@1e3c60f: Merge pull request redis/docker-library-redis#216 from infosiftr/templates
- redis/docker-library-redis@d875ae0: Add initial templating
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Jan 2, 2020
Changes:

- redis/docker-library-redis@3fe75d3: Merge pull request redis/docker-library-redis#219 from infosiftr/32bit
- redis/docker-library-redis@5e15797: Remove 32bit variants for 6.0+
- redis/docker-library-redis@0ed98d3: Merge pull request redis/docker-library-redis#218 from infosiftr/tls
- redis/docker-library-redis@b6d413c: Add TLS support in 6.0+ and unify templates slightly more
- redis/docker-library-redis@1e3c60f: Merge pull request redis/docker-library-redis#216 from infosiftr/templates
- redis/docker-library-redis@d875ae0: Add initial templating
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Templates

3 participants