Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades elixir to 1.5.0 #3240

Merged
merged 1 commit into from
Jul 27, 2017
Merged

Conversation

c0b
Copy link
Contributor

@c0b c0b commented Jul 26, 2017

for c0b/docker-elixir#37 c0b/docker-elixir#35 the v1.5.0 and the alpine image.

@yosifkit
Copy link
Member

Diff:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index eb23ec0..42f735b 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -2,5 +2,8 @@ elixir:1.2 @ amd64
 elixir:1.2-slim @ amd64
 elixir:1.3 @ amd64
 elixir:1.3-slim @ amd64
+elixir:1.4 @ amd64
+elixir:1.4-slim @ amd64
+elixir:alpine @ amd64
 elixir:latest @ amd64
 elixir:slim @ amd64
diff --git a/_bashbrew-list b/_bashbrew-list
index 123c7d7..d9a233b 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -10,5 +10,12 @@ elixir:1.4
 elixir:1.4-slim
 elixir:1.4.5
 elixir:1.4.5-slim
+elixir:1.5
+elixir:1.5-alpine
+elixir:1.5-slim
+elixir:1.5.0
+elixir:1.5.0-alpine
+elixir:1.5.0-slim
+elixir:alpine
 elixir:latest
 elixir:slim
diff --git a/elixir_slim/Dockerfile b/elixir_1.4-slim/Dockerfile
similarity index 100%
copy from elixir_slim/Dockerfile
copy to elixir_1.4-slim/Dockerfile
diff --git a/elixir_latest/Dockerfile b/elixir_1.4/Dockerfile
similarity index 100%
copy from elixir_latest/Dockerfile
copy to elixir_1.4/Dockerfile
diff --git a/elixir_slim/Dockerfile b/elixir_alpine/Dockerfile
similarity index 50%
copy from elixir_slim/Dockerfile
copy to elixir_alpine/Dockerfile
index 8e20599..a59350e 100644
--- a/elixir_slim/Dockerfile
+++ b/elixir_alpine/Dockerfile
@@ -1,25 +1,22 @@
-
-FROM erlang:19-slim
+FROM erlang:20-alpine
 
 # elixir expects utf8.
-ENV ELIXIR_VERSION="v1.4.5" \
+ENV ELIXIR_VERSION="v1.5.0" \
 	LANG=C.UTF-8
 
 RUN set -xe \
 	&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/Precompiled.zip" \
-	&& ELIXIR_DOWNLOAD_SHA256="a740e634e3c68b1477e16d75a0fd400237a46c62ceb5d04551dbc46093a03f98"\
+	&& ELIXIR_DOWNLOAD_SHA256="01841d8f973e10ea2e8e29342193063efb5ebe2c598c21dc8a3b93ec8428466a" \
 	&& buildDeps=' \
 		ca-certificates \
 		curl \
 		unzip \
 	' \
-	&& apt-get update \
-	&& apt-get install -y --no-install-recommends $buildDeps \
+	&& apk add --no-cache --virtual .build-deps $buildDeps \
 	&& curl -fSL -o elixir-precompiled.zip $ELIXIR_DOWNLOAD_URL \
-	&& echo "$ELIXIR_DOWNLOAD_SHA256 elixir-precompiled.zip" | sha256sum -c - \
+	&& echo "$ELIXIR_DOWNLOAD_SHA256  elixir-precompiled.zip" | sha256sum -c - \
 	&& unzip -d /usr/local elixir-precompiled.zip \
 	&& rm elixir-precompiled.zip \
-	&& apt-get purge -y --auto-remove $buildDeps \
-	&& rm -rf /var/lib/apt/lists/*
+	&& apk del .build-deps
 
 CMD ["iex"]
diff --git a/elixir_latest/Dockerfile b/elixir_latest/Dockerfile
index 5fe377b..6e108c4 100644
--- a/elixir_latest/Dockerfile
+++ b/elixir_latest/Dockerfile
@@ -1,22 +1,18 @@
-FROM erlang:19
+FROM erlang:20
 
 # elixir expects utf8.
-ENV ELIXIR_VERSION="v1.4.5" \
+ENV ELIXIR_VERSION="v1.5.0" \
 	LANG=C.UTF-8
 
 RUN set -xe \
-	&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/Precompiled.zip" \
-	&& ELIXIR_DOWNLOAD_SHA256="a740e634e3c68b1477e16d75a0fd400237a46c62ceb5d04551dbc46093a03f98"\
-	&& buildDeps=' \
-		unzip \
-	' \
-	&& apt-get update \
-	&& apt-get install -y --no-install-recommends $buildDeps \
-	&& curl -fSL -o elixir-precompiled.zip $ELIXIR_DOWNLOAD_URL \
-	&& echo "$ELIXIR_DOWNLOAD_SHA256 elixir-precompiled.zip" | sha256sum -c - \
-	&& unzip -d /usr/local elixir-precompiled.zip \
-	&& rm elixir-precompiled.zip \
-	&& apt-get purge -y --auto-remove $buildDeps \
-	&& rm -rf /var/lib/apt/lists/*
+	&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \
+	&& ELIXIR_DOWNLOAD_SHA256="0857550097d0bf078a218f7663372f5c9a899847d73399f05ca9fa9087edf462" \
+	&& curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \
+	&& echo "$ELIXIR_DOWNLOAD_SHA256  elixir-src.tar.gz" | sha256sum -c - \
+	&& mkdir -p /usr/local/src/elixir \
+	&& tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \
+	&& rm elixir-src.tar.gz \
+	&& cd /usr/local/src/elixir \
+	&& make install clean
 
 CMD ["iex"]
diff --git a/elixir_slim/Dockerfile b/elixir_slim/Dockerfile
index 8e20599..43bf6bb 100644
--- a/elixir_slim/Dockerfile
+++ b/elixir_slim/Dockerfile
@@ -1,13 +1,12 @@
-
-FROM erlang:19-slim
+FROM erlang:20-slim
 
 # elixir expects utf8.
-ENV ELIXIR_VERSION="v1.4.5" \
+ENV ELIXIR_VERSION="v1.5.0" \
 	LANG=C.UTF-8
 
 RUN set -xe \
 	&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/Precompiled.zip" \
-	&& ELIXIR_DOWNLOAD_SHA256="a740e634e3c68b1477e16d75a0fd400237a46c62ceb5d04551dbc46093a03f98"\
+	&& ELIXIR_DOWNLOAD_SHA256="01841d8f973e10ea2e8e29342193063efb5ebe2c598c21dc8a3b93ec8428466a" \
 	&& buildDeps=' \
 		ca-certificates \
 		curl \
@@ -16,7 +15,7 @@ RUN set -xe \
 	&& apt-get update \
 	&& apt-get install -y --no-install-recommends $buildDeps \
 	&& curl -fSL -o elixir-precompiled.zip $ELIXIR_DOWNLOAD_URL \
-	&& echo "$ELIXIR_DOWNLOAD_SHA256 elixir-precompiled.zip" | sha256sum -c - \
+	&& echo "$ELIXIR_DOWNLOAD_SHA256  elixir-precompiled.zip" | sha256sum -c - \
 	&& unzip -d /usr/local elixir-precompiled.zip \
 	&& rm elixir-precompiled.zip \
 	&& apt-get purge -y --auto-remove $buildDeps \

@yosifkit
Copy link
Member

Build test of #3240; ad1e61d (elixir):

$ bashbrew build elixir:1.5.0
Building bashbrew/cache:3ccb0602384272e300c8cb9633d8c1537986c00633a6681bf4cfc70bd3eb8fc0 (elixir:1.5.0)
Tagging elixir:1.5.0
Tagging elixir:1.5
Tagging elixir:latest

$ test/run.sh elixir:1.5.0
testing elixir:1.5.0
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.5.0-slim
Building bashbrew/cache:5afa8abacad8bf5f2826573077454cba65196d5f62e00a13565de6326366217f (elixir:1.5.0-slim)
Tagging elixir:1.5.0-slim
Tagging elixir:1.5-slim
Tagging elixir:slim

$ test/run.sh elixir:1.5.0-slim
testing elixir:1.5.0-slim
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.5.0-alpine
Building bashbrew/cache:d8018b2b068649047de24b550972a322d59869827c3b16e0a5e167fe52ed9b74 (elixir:1.5.0-alpine)
Tagging elixir:1.5.0-alpine
Tagging elixir:1.5-alpine
Tagging elixir:alpine

$ test/run.sh elixir:1.5.0-alpine
testing elixir:1.5.0-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.4.5
Building bashbrew/cache:ffc273c83ee97b2bff1d0e1d573c31212619cb903f5abb5071a3aea127dc071f (elixir:1.4.5)
Tagging elixir:1.4.5
Tagging elixir:1.4

$ test/run.sh elixir:1.4.5
testing elixir:1.4.5
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.4.5-slim
Building bashbrew/cache:07a8642f76c99ab39ff5fcedbbf210e316200e3f48dac894bcfcb80de6b21883 (elixir:1.4.5-slim)
Tagging elixir:1.4.5-slim
Tagging elixir:1.4-slim

$ test/run.sh elixir:1.4.5-slim
testing elixir:1.4.5-slim
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.3.4
Building bashbrew/cache:d55dcec90dc57cb45ea42f22a77dda73d37524c2b7fa8d29cc4ada05649e119e (elixir:1.3.4)
Tagging elixir:1.3.4
Tagging elixir:1.3

$ test/run.sh elixir:1.3.4
testing elixir:1.3.4
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.3.4-slim
Building bashbrew/cache:d3a336171c33d464458eda44210c2a8a0c0250bc9eeaf7965a9ac15b1cbf1b06 (elixir:1.3.4-slim)
Tagging elixir:1.3.4-slim
Tagging elixir:1.3-slim

$ test/run.sh elixir:1.3.4-slim
testing elixir:1.3.4-slim
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.2.6
Building bashbrew/cache:df180b36037a07dc9e399db3f786843584a3437ce7a8bec7638eee83917cef8b (elixir:1.2.6)
Tagging elixir:1.2.6
Tagging elixir:1.2

$ test/run.sh elixir:1.2.6
testing elixir:1.2.6
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed


$ bashbrew build elixir:1.2.6-slim
Using bashbrew/cache:1df338f9be5a08910049d77edc2716ad9b4a73d7e079c3f0ce136f29c17db481 (elixir:1.2.6-slim)
Tagging elixir:1.2.6-slim
Tagging elixir:1.2-slim

$ test/run.sh elixir:1.2.6-slim
testing elixir:1.2.6-slim
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'elixir-hello-world' [5/5]...passed

@yosifkit yosifkit merged commit 44461f2 into docker-library:master Jul 27, 2017
@c0b c0b deleted the upgrade/elixir-1.5.0 branch January 28, 2018 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants