Skip to content

Conversation

@tianon
Copy link
Member

@tianon tianon commented Apr 26, 2017

- `docker`: experimental multiarch (docker-library/docker#52)
- `golang`: experimental multiarch (docker-library/golang#158)
- `nextcloud`: 10.0.5, 11.0.3, 9.0.58, update via container updates (nextcloud/docker#65)
- `postgres`: ensure `postgres` user's HOME has decent permissions (docker-library/postgres#277)
- `python`: fix `pip` install to also install `setuptools` and `wheel` (docker-library/python#186, docker-library/python#187)
@tianon
Copy link
Member Author

tianon commented Apr 26, 2017

Diff:

Details
diff --git a/docker_edge/Dockerfile b/docker_edge/Dockerfile
index 95b9538..c92e76e 100644
--- a/docker_edge/Dockerfile
+++ b/docker_edge/Dockerfile
@@ -7,16 +7,25 @@ RUN apk add --no-cache \
 
 ENV DOCKER_BUCKET get.docker.com
 ENV DOCKER_VERSION 17.04.0-ce
-ENV DOCKER_SHA256 c52cff62c4368a978b52e3d03819054d87bcd00d15514934ce2e0e09b99dd100
+ENV DOCKER_SHA256_x86_64 c52cff62c4368a978b52e3d03819054d87bcd00d15514934ce2e0e09b99dd100
+ENV DOCKER_SHA256_armel 9b7df7dc02f620748657d3f599a9701c35f7b0b3d0acbc7fd324126ba5f6c4e9
 
-RUN set -x \
-	&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
-	&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
-	&& tar -xzvf docker.tgz \
-	&& mv docker/* /usr/local/bin/ \
-	&& rmdir docker \
-	&& rm docker.tgz \
-	&& docker -v
+RUN set -ex; \
+	apkArch="$(apk --print-arch)"; \
+	case "$apkArch" in \
+		x86_64) dockerArch=x86_64 ;; \
+		armhf) dockerArch=armel ;; \
+		*) echo >&2 "error: unknown Docker static binary arch $apkArch"; exit 1 ;; \
+	esac; \
+	curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/${dockerArch}/docker-${DOCKER_VERSION}.tgz" -o docker.tgz; \
+# /bin/sh doesn't support ${!...} :(
+	sha256="DOCKER_SHA256_${dockerArch}"; sha256="$(eval "echo \$${sha256}")"; \
+	echo "${sha256} *docker.tgz" | sha256sum -c -; \
+	tar -xzvf docker.tgz; \
+	mv docker/* /usr/local/bin/; \
+	rmdir docker; \
+	rm docker.tgz; \
+	docker -v
 
 COPY docker-entrypoint.sh /usr/local/bin/
 
diff --git a/docker_rc/Dockerfile b/docker_rc/Dockerfile
index 17ad37e..4336286 100644
--- a/docker_rc/Dockerfile
+++ b/docker_rc/Dockerfile
@@ -7,16 +7,25 @@ RUN apk add --no-cache \
 
 ENV DOCKER_BUCKET test.docker.com
 ENV DOCKER_VERSION 17.05.0-ce-rc1
-ENV DOCKER_SHA256 4561742c2174c01ffd0679621b66d29f8a504240d79aa714f6c58348979d02c6
+ENV DOCKER_SHA256_x86_64 4561742c2174c01ffd0679621b66d29f8a504240d79aa714f6c58348979d02c6
+ENV DOCKER_SHA256_armel 55da582c59e2f2ccebf74c661290ecdc4d503b53acff1644a85f1c1d60dfd661
 
-RUN set -x \
-	&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
-	&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
-	&& tar -xzvf docker.tgz \
-	&& mv docker/* /usr/local/bin/ \
-	&& rmdir docker \
-	&& rm docker.tgz \
-	&& docker -v
+RUN set -ex; \
+	apkArch="$(apk --print-arch)"; \
+	case "$apkArch" in \
+		x86_64) dockerArch=x86_64 ;; \
+		armhf) dockerArch=armel ;; \
+		*) echo >&2 "error: unknown Docker static binary arch $apkArch"; exit 1 ;; \
+	esac; \
+	curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/${dockerArch}/docker-${DOCKER_VERSION}.tgz" -o docker.tgz; \
+# /bin/sh doesn't support ${!...} :(
+	sha256="DOCKER_SHA256_${dockerArch}"; sha256="$(eval "echo \$${sha256}")"; \
+	echo "${sha256} *docker.tgz" | sha256sum -c -; \
+	tar -xzvf docker.tgz; \
+	mv docker/* /usr/local/bin/; \
+	rmdir docker; \
+	rm docker.tgz; \
+	docker -v
 
 COPY docker-entrypoint.sh /usr/local/bin/
 
diff --git a/docker_stable/Dockerfile b/docker_stable/Dockerfile
index 4dabfff..2eec80c 100644
--- a/docker_stable/Dockerfile
+++ b/docker_stable/Dockerfile
@@ -7,16 +7,25 @@ RUN apk add --no-cache \
 
 ENV DOCKER_BUCKET get.docker.com
 ENV DOCKER_VERSION 17.03.1-ce
-ENV DOCKER_SHA256 820d13b5699b5df63f7032c8517a5f118a44e2be548dd03271a86656a544af55
+ENV DOCKER_SHA256_x86_64 820d13b5699b5df63f7032c8517a5f118a44e2be548dd03271a86656a544af55
+ENV DOCKER_SHA256_armel f05c733c22915b0c26d8b0390b26a026b33aaf7593d15475a6f86e1bbe1ddbe2
 
-RUN set -x \
-	&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
-	&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
-	&& tar -xzvf docker.tgz \
-	&& mv docker/* /usr/local/bin/ \
-	&& rmdir docker \
-	&& rm docker.tgz \
-	&& docker -v
+RUN set -ex; \
+	apkArch="$(apk --print-arch)"; \
+	case "$apkArch" in \
+		x86_64) dockerArch=x86_64 ;; \
+		armhf) dockerArch=armel ;; \
+		*) echo >&2 "error: unknown Docker static binary arch $apkArch"; exit 1 ;; \
+	esac; \
+	curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/${dockerArch}/docker-${DOCKER_VERSION}.tgz" -o docker.tgz; \
+# /bin/sh doesn't support ${!...} :(
+	sha256="DOCKER_SHA256_${dockerArch}"; sha256="$(eval "echo \$${sha256}")"; \
+	echo "${sha256} *docker.tgz" | sha256sum -c -; \
+	tar -xzvf docker.tgz; \
+	mv docker/* /usr/local/bin/; \
+	rmdir docker; \
+	rm docker.tgz; \
+	docker -v
 
 COPY docker-entrypoint.sh /usr/local/bin/
 
diff --git a/golang_1.7-alpine/Dockerfile b/golang_1.7-alpine/Dockerfile
index 74f0336..66c8a27 100644
--- a/golang_1.7-alpine/Dockerfile
+++ b/golang_1.7-alpine/Dockerfile
@@ -3,35 +3,38 @@ FROM alpine:3.4
 RUN apk add --no-cache ca-certificates
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz
-ENV GOLANG_SRC_SHA256 4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815
 
-# https://golang.org/issue/14851
-COPY no-pic.patch /
-# https://golang.org/issue/17847
-COPY 17847.patch /
+# https://golang.org/issue/14851 (Go 1.8 & 1.7)
+# https://golang.org/issue/17847 (Go 1.7)
+COPY *.patch /go-alpine-patches/
 
-RUN set -ex \
-	&& apk add --no-cache --virtual .build-deps \
+RUN set -eux; \
+	apk add --no-cache --virtual .build-deps \
 		bash \
 		gcc \
 		musl-dev \
 		openssl \
 		go \
+	; \
+	export GOROOT_BOOTSTRAP="$(go env GOROOT)"; \
 	\
-	&& export GOROOT_BOOTSTRAP="$(go env GOROOT)" \
+	wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
+	echo '4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815 *go.tgz' | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
 	\
-	&& wget -q "$GOLANG_SRC_URL" -O golang.tar.gz \
-	&& echo "$GOLANG_SRC_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz \
-	&& cd /usr/local/go/src \
-	&& patch -p2 -i /no-pic.patch \
-	&& patch -p2 -i /17847.patch \
-	&& ./make.bash \
+	cd /usr/local/go/src; \
+	for p in /go-alpine-patches/*.patch; do \
+		[ -f "$p" ] || continue; \
+		patch -p2 -i "$p"; \
+	done; \
+	./make.bash; \
 	\
-	&& rm -rf /*.patch \
-	&& apk del .build-deps
+	rm -rf /go-alpine-patches; \
+	apk del .build-deps; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_1.7-alpine3.5/Dockerfile b/golang_1.7-alpine3.5/Dockerfile
index fe4bdb6..31016da 100644
--- a/golang_1.7-alpine3.5/Dockerfile
+++ b/golang_1.7-alpine3.5/Dockerfile
@@ -3,35 +3,38 @@ FROM alpine:3.5
 RUN apk add --no-cache ca-certificates
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz
-ENV GOLANG_SRC_SHA256 4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815
 
-# https://golang.org/issue/14851
-COPY no-pic.patch /
-# https://golang.org/issue/17847
-COPY 17847.patch /
+# https://golang.org/issue/14851 (Go 1.8 & 1.7)
+# https://golang.org/issue/17847 (Go 1.7)
+COPY *.patch /go-alpine-patches/
 
-RUN set -ex \
-	&& apk add --no-cache --virtual .build-deps \
+RUN set -eux; \
+	apk add --no-cache --virtual .build-deps \
 		bash \
 		gcc \
 		musl-dev \
 		openssl \
 		go \
+	; \
+	export GOROOT_BOOTSTRAP="$(go env GOROOT)"; \
 	\
-	&& export GOROOT_BOOTSTRAP="$(go env GOROOT)" \
+	wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
+	echo '4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815 *go.tgz' | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
 	\
-	&& wget -q "$GOLANG_SRC_URL" -O golang.tar.gz \
-	&& echo "$GOLANG_SRC_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz \
-	&& cd /usr/local/go/src \
-	&& patch -p2 -i /no-pic.patch \
-	&& patch -p2 -i /17847.patch \
-	&& ./make.bash \
+	cd /usr/local/go/src; \
+	for p in /go-alpine-patches/*.patch; do \
+		[ -f "$p" ] || continue; \
+		patch -p2 -i "$p"; \
+	done; \
+	./make.bash; \
 	\
-	&& rm -rf /*.patch \
-	&& apk del .build-deps
+	rm -rf /go-alpine-patches; \
+	apk del .build-deps; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_1.7-nanoserver/Dockerfile b/golang_1.7-nanoserver/Dockerfile
index 8d668bc..0e1e17e 100644
--- a/golang_1.7-nanoserver/Dockerfile
+++ b/golang_1.7-nanoserver/Dockerfile
@@ -17,14 +17,14 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
 # doing this first to share cache across versions more aggressively
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 01eb518cb5a12edd6cf7380ec17ebedee755e3ce7e5362febeebb9e70e45fcaa
 
-RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
-	Invoke-WebRequest -Uri $env:GOLANG_DOWNLOAD_URL -OutFile 'go.zip'; \
+RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+	Write-Host ('Downloading {0} ...' -f $url); \
+	Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
 	\
-	Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
-	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+	$sha256 = '01eb518cb5a12edd6cf7380ec17ebedee755e3ce7e5362febeebb9e70e45fcaa'; \
+	Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
+	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
 		Write-Host 'FAILED!'; \
 		exit 1; \
 	}; \
diff --git a/golang_1.7-wheezy/Dockerfile b/golang_1.7-wheezy/Dockerfile
index 1467123..a5a1db2 100644
--- a/golang_1.7-wheezy/Dockerfile
+++ b/golang_1.7-wheezy/Dockerfile
@@ -10,13 +10,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
-ENV GOLANG_DOWNLOAD_SHA256 2e4dd6c44f0693bef4e7b46cc701513d74c3cc44f2419bf519d7868b12931ac3
 
-RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
-	&& echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz
+RUN set -eux; \
+	\
+# this "case" statement is generated via "update.sh"
+	dpkgArch="$(dpkg --print-architecture)"; \
+	case "${dpkgArch##*-}" in \
+		ppc64el) goRelArch='linux-ppc64le'; goRelSha256='ced737e36f2b2017b59f31cce86f50a2519245f017a81b8dce93bf986717e3ed' ;; \
+		i386) goRelArch='linux-386'; goRelSha256='432cb92ae656f6fe1fa96a981782ef5948438b6da6691423aae900918b1eb955' ;; \
+		s390x) goRelArch='linux-s390x'; goRelSha256='858df47609594570479ff937e3704c58e06b40e485ce29d7f934eae87b7a4450' ;; \
+		armhf) goRelArch='linux-armv6l'; goRelSha256='cf93c8171dda189c226fe337e3aae11db24bd600841caab36c91d753f631aa2b' ;; \
+		amd64) goRelArch='linux-amd64'; goRelSha256='2e4dd6c44f0693bef4e7b46cc701513d74c3cc44f2419bf519d7868b12931ac3' ;; \
+		*) goRelArch='src'; goRelSha256='4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815'; \
+			echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+	esac; \
+	\
+	url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+	wget -O go.tgz "$url"; \
+	echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
+	\
+	if [ "$goRelArch" = 'src' ]; then \
+		echo >&2; \
+		echo >&2 'error: UNIMPLEMENTED'; \
+		echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
+		echo >&2; \
+		exit 1; \
+	fi; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_1.7-windowsservercore/Dockerfile b/golang_1.7-windowsservercore/Dockerfile
index cd60557..be5baee 100644
--- a/golang_1.7-windowsservercore/Dockerfile
+++ b/golang_1.7-windowsservercore/Dockerfile
@@ -46,14 +46,14 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
 # doing this first to share cache across versions more aggressively
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 01eb518cb5a12edd6cf7380ec17ebedee755e3ce7e5362febeebb9e70e45fcaa
 
-RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
-	Invoke-WebRequest -Uri $env:GOLANG_DOWNLOAD_URL -OutFile 'go.zip'; \
+RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+	Write-Host ('Downloading {0} ...' -f $url); \
+	Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
 	\
-	Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
-	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+	$sha256 = '01eb518cb5a12edd6cf7380ec17ebedee755e3ce7e5362febeebb9e70e45fcaa'; \
+	Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
+	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
 		Write-Host 'FAILED!'; \
 		exit 1; \
 	}; \
diff --git a/golang_1.7/Dockerfile b/golang_1.7/Dockerfile
index 7e227c2..1647524 100644
--- a/golang_1.7/Dockerfile
+++ b/golang_1.7/Dockerfile
@@ -10,13 +10,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.7.5
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
-ENV GOLANG_DOWNLOAD_SHA256 2e4dd6c44f0693bef4e7b46cc701513d74c3cc44f2419bf519d7868b12931ac3
 
-RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
-	&& echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz
+RUN set -eux; \
+	\
+# this "case" statement is generated via "update.sh"
+	dpkgArch="$(dpkg --print-architecture)"; \
+	case "${dpkgArch##*-}" in \
+		ppc64el) goRelArch='linux-ppc64le'; goRelSha256='ced737e36f2b2017b59f31cce86f50a2519245f017a81b8dce93bf986717e3ed' ;; \
+		i386) goRelArch='linux-386'; goRelSha256='432cb92ae656f6fe1fa96a981782ef5948438b6da6691423aae900918b1eb955' ;; \
+		s390x) goRelArch='linux-s390x'; goRelSha256='858df47609594570479ff937e3704c58e06b40e485ce29d7f934eae87b7a4450' ;; \
+		armhf) goRelArch='linux-armv6l'; goRelSha256='cf93c8171dda189c226fe337e3aae11db24bd600841caab36c91d753f631aa2b' ;; \
+		amd64) goRelArch='linux-amd64'; goRelSha256='2e4dd6c44f0693bef4e7b46cc701513d74c3cc44f2419bf519d7868b12931ac3' ;; \
+		*) goRelArch='src'; goRelSha256='4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815'; \
+			echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+	esac; \
+	\
+	url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+	wget -O go.tgz "$url"; \
+	echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
+	\
+	if [ "$goRelArch" = 'src' ]; then \
+		echo >&2; \
+		echo >&2 'error: UNIMPLEMENTED'; \
+		echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
+		echo >&2; \
+		exit 1; \
+	fi; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_alpine/Dockerfile b/golang_alpine/Dockerfile
index bb56722..7e485b8 100644
--- a/golang_alpine/Dockerfile
+++ b/golang_alpine/Dockerfile
@@ -3,32 +3,38 @@ FROM alpine:3.5
 RUN apk add --no-cache ca-certificates
 
 ENV GOLANG_VERSION 1.8.1
-ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz
-ENV GOLANG_SRC_SHA256 33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57
 
-# https://golang.org/issue/14851
-COPY no-pic.patch /
+# https://golang.org/issue/14851 (Go 1.8 & 1.7)
+# https://golang.org/issue/17847 (Go 1.7)
+COPY *.patch /go-alpine-patches/
 
-RUN set -ex \
-	&& apk add --no-cache --virtual .build-deps \
+RUN set -eux; \
+	apk add --no-cache --virtual .build-deps \
 		bash \
 		gcc \
 		musl-dev \
 		openssl \
 		go \
+	; \
+	export GOROOT_BOOTSTRAP="$(go env GOROOT)"; \
 	\
-	&& export GOROOT_BOOTSTRAP="$(go env GOROOT)" \
+	wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \
+	echo '33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57 *go.tgz' | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
 	\
-	&& wget -q "$GOLANG_SRC_URL" -O golang.tar.gz \
-	&& echo "$GOLANG_SRC_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz \
-	&& cd /usr/local/go/src \
-	&& patch -p2 -i /no-pic.patch \
-	&& ./make.bash \
+	cd /usr/local/go/src; \
+	for p in /go-alpine-patches/*.patch; do \
+		[ -f "$p" ] || continue; \
+		patch -p2 -i "$p"; \
+	done; \
+	./make.bash; \
 	\
-	&& rm -rf /*.patch \
-	&& apk del .build-deps
+	rm -rf /go-alpine-patches; \
+	apk del .build-deps; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_latest/Dockerfile b/golang_latest/Dockerfile
index b294c74..7d33cc6 100644
--- a/golang_latest/Dockerfile
+++ b/golang_latest/Dockerfile
@@ -10,13 +10,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.8.1
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
-ENV GOLANG_DOWNLOAD_SHA256 a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994
 
-RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
-	&& echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz
+RUN set -eux; \
+	\
+# this "case" statement is generated via "update.sh"
+	dpkgArch="$(dpkg --print-architecture)"; \
+	case "${dpkgArch##*-}" in \
+		ppc64el) goRelArch='linux-ppc64le'; goRelSha256='b7b47572a2676449716865a66901090c057f6f1d8dfb1e19528fcd0372e5ce74' ;; \
+		i386) goRelArch='linux-386'; goRelSha256='cb3f4527112075a8b045d708f793aeee2709d2f5ddd320973a1413db06fddb50' ;; \
+		s390x) goRelArch='linux-s390x'; goRelSha256='0a59f4034a27fc51431989da520fd244d5261f364888134cab737e5bc2158cb2' ;; \
+		armhf) goRelArch='linux-armv6l'; goRelSha256='e8a8326913640409028ef95c2107773f989b1b2a6e11ceb463c77c42887381da' ;; \
+		amd64) goRelArch='linux-amd64'; goRelSha256='a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994' ;; \
+		*) goRelArch='src'; goRelSha256='33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57'; \
+			echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+	esac; \
+	\
+	url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+	wget -O go.tgz "$url"; \
+	echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
+	\
+	if [ "$goRelArch" = 'src' ]; then \
+		echo >&2; \
+		echo >&2 'error: UNIMPLEMENTED'; \
+		echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
+		echo >&2; \
+		exit 1; \
+	fi; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_nanoserver/Dockerfile b/golang_nanoserver/Dockerfile
index 7098eea..8403530 100644
--- a/golang_nanoserver/Dockerfile
+++ b/golang_nanoserver/Dockerfile
@@ -17,14 +17,14 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
 # doing this first to share cache across versions more aggressively
 
 ENV GOLANG_VERSION 1.8.1
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 bb6f0fbef8b80c382455af8699bfbb7fe89256d4baf06d927feaeceb7342e4ee
 
-RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
-	Invoke-WebRequest -Uri $env:GOLANG_DOWNLOAD_URL -OutFile 'go.zip'; \
+RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+	Write-Host ('Downloading {0} ...' -f $url); \
+	Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
 	\
-	Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
-	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+	$sha256 = 'bb6f0fbef8b80c382455af8699bfbb7fe89256d4baf06d927feaeceb7342e4ee'; \
+	Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
+	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
 		Write-Host 'FAILED!'; \
 		exit 1; \
 	}; \
diff --git a/golang_stretch/Dockerfile b/golang_stretch/Dockerfile
index 8d512c4..afe68cb 100644
--- a/golang_stretch/Dockerfile
+++ b/golang_stretch/Dockerfile
@@ -10,13 +10,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV GOLANG_VERSION 1.8.1
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
-ENV GOLANG_DOWNLOAD_SHA256 a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994
 
-RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
-	&& echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
-	&& tar -C /usr/local -xzf golang.tar.gz \
-	&& rm golang.tar.gz
+RUN set -eux; \
+	\
+# this "case" statement is generated via "update.sh"
+	dpkgArch="$(dpkg --print-architecture)"; \
+	case "${dpkgArch##*-}" in \
+		ppc64el) goRelArch='linux-ppc64le'; goRelSha256='b7b47572a2676449716865a66901090c057f6f1d8dfb1e19528fcd0372e5ce74' ;; \
+		i386) goRelArch='linux-386'; goRelSha256='cb3f4527112075a8b045d708f793aeee2709d2f5ddd320973a1413db06fddb50' ;; \
+		s390x) goRelArch='linux-s390x'; goRelSha256='0a59f4034a27fc51431989da520fd244d5261f364888134cab737e5bc2158cb2' ;; \
+		armhf) goRelArch='linux-armv6l'; goRelSha256='e8a8326913640409028ef95c2107773f989b1b2a6e11ceb463c77c42887381da' ;; \
+		amd64) goRelArch='linux-amd64'; goRelSha256='a579ab19d5237e263254f1eac5352efcf1d70b9dacadb6d6bb12b0911ede8994' ;; \
+		*) goRelArch='src'; goRelSha256='33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57'; \
+			echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
+	esac; \
+	\
+	url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
+	wget -O go.tgz "$url"; \
+	echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
+	tar -C /usr/local -xzf go.tgz; \
+	rm go.tgz; \
+	\
+	if [ "$goRelArch" = 'src' ]; then \
+		echo >&2; \
+		echo >&2 'error: UNIMPLEMENTED'; \
+		echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
+		echo >&2; \
+		exit 1; \
+	fi; \
+	\
+	export PATH="/usr/local/go/bin:$PATH"; \
+	go version
 
 ENV GOPATH /go
 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
diff --git a/golang_windowsservercore/Dockerfile b/golang_windowsservercore/Dockerfile
index 2b5121b..1aa27da 100644
--- a/golang_windowsservercore/Dockerfile
+++ b/golang_windowsservercore/Dockerfile
@@ -46,14 +46,14 @@ RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \
 # doing this first to share cache across versions more aggressively
 
 ENV GOLANG_VERSION 1.8.1
-ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip
-ENV GOLANG_DOWNLOAD_SHA256 bb6f0fbef8b80c382455af8699bfbb7fe89256d4baf06d927feaeceb7342e4ee
 
-RUN Write-Host ('Downloading {0} ...' -f $env:GOLANG_DOWNLOAD_URL); \
-	Invoke-WebRequest -Uri $env:GOLANG_DOWNLOAD_URL -OutFile 'go.zip'; \
+RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \
+	Write-Host ('Downloading {0} ...' -f $url); \
+	Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
 	\
-	Write-Host ('Verifying sha256 ({0}) ...' -f $env:GOLANG_DOWNLOAD_SHA256); \
-	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $env:GOLANG_DOWNLOAD_SHA256) { \
+	$sha256 = 'bb6f0fbef8b80c382455af8699bfbb7fe89256d4baf06d927feaeceb7342e4ee'; \
+	Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
+	if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
 		Write-Host 'FAILED!'; \
 		exit 1; \
 	}; \
diff --git a/nextcloud_10-fpm/Dockerfile b/nextcloud_10-fpm/Dockerfile
index 5619a17..b60b57f 100644
--- a/nextcloud_10-fpm/Dockerfile
+++ b/nextcloud_10-fpm/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:5.6-fpm
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -50,9 +51,22 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["php-fpm"]
diff --git a/nextcloud_10-fpm/apps.config.php b/nextcloud_10-fpm/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_10-fpm/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_10-fpm/docker-entrypoint.sh b/nextcloud_10-fpm/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_10-fpm/docker-entrypoint.sh
+++ b/nextcloud_10-fpm/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/nextcloud_10/Dockerfile b/nextcloud_10/Dockerfile
index 3798deb..570aef6 100644
--- a/nextcloud_10/Dockerfile
+++ b/nextcloud_10/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:5.6-apache
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -52,9 +53,22 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["apache2-foreground"]
diff --git a/nextcloud_10/apps.config.php b/nextcloud_10/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_10/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_10/docker-entrypoint.sh b/nextcloud_10/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_10/docker-entrypoint.sh
+++ b/nextcloud_10/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/nextcloud_9-fpm/Dockerfile b/nextcloud_9-fpm/Dockerfile
index 44027c5..fd82cb3 100644
--- a/nextcloud_9-fpm/Dockerfile
+++ b/nextcloud_9-fpm/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:5.6-fpm
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -50,9 +51,26 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ # only used in nextcloud 9 (assets)
+ && mkdir -p /usr/src/nextcloud/assets \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ # only used in nextcloud 9 (assets)
+ && chown -R www-data:www-data /usr/src/nextcloud/assets/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["php-fpm"]
diff --git a/nextcloud_9-fpm/apps.config.php b/nextcloud_9-fpm/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_9-fpm/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_9-fpm/docker-entrypoint.sh b/nextcloud_9-fpm/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_9-fpm/docker-entrypoint.sh
+++ b/nextcloud_9-fpm/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/nextcloud_9/Dockerfile b/nextcloud_9/Dockerfile
index 56d4616..07ede26 100644
--- a/nextcloud_9/Dockerfile
+++ b/nextcloud_9/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:5.6-apache
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -52,9 +53,26 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ # only used in nextcloud 9 (assets)
+ && mkdir -p /usr/src/nextcloud/assets \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ # only used in nextcloud 9 (assets)
+ && chown -R www-data:www-data /usr/src/nextcloud/assets/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["apache2-foreground"]
diff --git a/nextcloud_9/apps.config.php b/nextcloud_9/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_9/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_9/docker-entrypoint.sh b/nextcloud_9/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_9/docker-entrypoint.sh
+++ b/nextcloud_9/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/nextcloud_fpm/Dockerfile b/nextcloud_fpm/Dockerfile
index fa31bfb..0b86d16 100644
--- a/nextcloud_fpm/Dockerfile
+++ b/nextcloud_fpm/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:7.1-fpm
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -50,9 +51,22 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["php-fpm"]
diff --git a/nextcloud_fpm/apps.config.php b/nextcloud_fpm/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_fpm/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_fpm/docker-entrypoint.sh b/nextcloud_fpm/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_fpm/docker-entrypoint.sh
+++ b/nextcloud_fpm/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/nextcloud_latest/Dockerfile b/nextcloud_latest/Dockerfile
index c0a522b..3ba14c7 100644
--- a/nextcloud_latest/Dockerfile
+++ b/nextcloud_latest/Dockerfile
@@ -1,6 +1,7 @@
 FROM php:7.1-apache
 
 RUN apt-get update && apt-get install -y \
+  rsync \
   bzip2 \
   libcurl4-openssl-dev \
   libfreetype6-dev \
@@ -52,9 +53,22 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 \
  && rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
- && rm nextcloud.tar.bz2
+ && rm nextcloud.tar.bz2 \
+ && rm -rf /usr/src/nextcloud/updater \
+ # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
+ && mkdir -p /usr/src/nextcloud/data \
+ && mkdir -p /usr/src/nextcloud/custom_apps \
+ && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
+ && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
+ && chown -R root:www-data /usr/src/nextcloud/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/config/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/data/ \
+ && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
+ && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY apps.config.php /usr/src/nextcloud/config/apps.config.php
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["apache2-foreground"]
diff --git a/nextcloud_latest/apps.config.php b/nextcloud_latest/apps.config.php
new file mode 100644
index 0000000..a4bed83
--- /dev/null
+++ b/nextcloud_latest/apps.config.php
@@ -0,0 +1,15 @@
+<?php
+$CONFIG = array (
+  "apps_paths" => array (
+      0 => array (
+              "path"     => OC::$SERVERROOT."/apps",
+              "url"      => "/apps",
+              "writable" => false,
+      ),
+      1 => array (
+              "path"     => OC::$SERVERROOT."/custom_apps",
+              "url"      => "/custom_apps",
+              "writable" => true,
+      ),
+  ),
+);
diff --git a/nextcloud_latest/docker-entrypoint.sh b/nextcloud_latest/docker-entrypoint.sh
index 62d1625..b2bf65e 100755
--- a/nextcloud_latest/docker-entrypoint.sh
+++ b/nextcloud_latest/docker-entrypoint.sh
@@ -1,9 +1,50 @@
 #!/bin/bash
 set -e
 
-if [ ! -e '/var/www/html/version.php' ]; then
-    tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf -
-    chown -R www-data /var/www/html
+# version_greater A B returns whether A > B
+function version_greater() {
+	[[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" ]];
+}
+
+installed_version="0.0.0~unknown"
+if [ -f /var/www/html/version.php ]; then
+    installed_version=$(php -r 'require "/var/www/html/version.php"; echo "$OC_VersionString";')
+fi
+image_version=$(php -r 'require "/usr/src/nextcloud/version.php"; echo "$OC_VersionString";')
+
+if version_greater "$installed_version" "$image_version"; then
+    echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
+    exit 1
+fi
+
+if version_greater "$image_version" "$installed_version"; then
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+
+    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ /usr/src/nextcloud/ /var/www/html/
+
+    if [ ! -d /var/www/html/config ]; then
+        cp -arT /usr/src/nextcloud/config /var/www/html/config
+    fi
+
+    if [ ! -d /var/www/html/data ]; then
+        cp -arT /usr/src/nextcloud/data /var/www/html/data
+    fi
+
+    if [ ! -d /var/www/html/custom_apps ]; then
+        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
+        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
+    fi
+
+    if [ "$installed_version" != "0.0.0~unknown" ]; then
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+
+        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        echo "The following apps have beed disabled:"
+        diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
+        rm -f /tmp/list_before /tmp/list_after
+    fi
 fi
 
 exec "$@"
diff --git a/postgres_9.2-alpine/Dockerfile b/postgres_9.2-alpine/Dockerfile
index 03667ba..b31ed63 100644
--- a/postgres_9.2-alpine/Dockerfile
+++ b/postgres_9.2-alpine/Dockerfile
@@ -2,8 +2,16 @@
 FROM alpine:3.5
 
 # alpine includes "postgres" user/group in base install
-# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
-# /etc/group:34:postgres:x:70:
+#   /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
+#   /etc/group:34:postgres:x:70:
+# the home directory for the postgres user, however, is not created by default
+# see https://github.com/docker-library/postgres/issues/274
+RUN set -ex; \
+	postgresHome="$(getent passwd postgres)"; \
+	postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
+	[ "$postgresHome" = '/var/lib/postgresql' ]; \
+	mkdir -p "$postgresHome"; \
+	chown -R postgres:postgres "$postgresHome"
 
 # su-exec (gosu-compatible) is installed further down
 
diff --git a/postgres_9.3-alpine/Dockerfile b/postgres_9.3-alpine/Dockerfile
index 5f929e7..ff4232c 100644
--- a/postgres_9.3-alpine/Dockerfile
+++ b/postgres_9.3-alpine/Dockerfile
@@ -2,8 +2,16 @@
 FROM alpine:3.5
 
 # alpine includes "postgres" user/group in base install
-# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
-# /etc/group:34:postgres:x:70:
+#   /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
+#   /etc/group:34:postgres:x:70:
+# the home directory for the postgres user, however, is not created by default
+# see https://github.com/docker-library/postgres/issues/274
+RUN set -ex; \
+	postgresHome="$(getent passwd postgres)"; \
+	postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
+	[ "$postgresHome" = '/var/lib/postgresql' ]; \
+	mkdir -p "$postgresHome"; \
+	chown -R postgres:postgres "$postgresHome"
 
 # su-exec (gosu-compatible) is installed further down
 
diff --git a/postgres_9.4-alpine/Dockerfile b/postgres_9.4-alpine/Dockerfile
index c29beb5..6da5058 100644
--- a/postgres_9.4-alpine/Dockerfile
+++ b/postgres_9.4-alpine/Dockerfile
@@ -2,8 +2,16 @@
 FROM alpine:3.5
 
 # alpine includes "postgres" user/group in base install
-# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
-# /etc/group:34:postgres:x:70:
+#   /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
+#   /etc/group:34:postgres:x:70:
+# the home directory for the postgres user, however, is not created by default
+# see https://github.com/docker-library/postgres/issues/274
+RUN set -ex; \
+	postgresHome="$(getent passwd postgres)"; \
+	postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
+	[ "$postgresHome" = '/var/lib/postgresql' ]; \
+	mkdir -p "$postgresHome"; \
+	chown -R postgres:postgres "$postgresHome"
 
 # su-exec (gosu-compatible) is installed further down
 
diff --git a/postgres_9.5-alpine/Dockerfile b/postgres_9.5-alpine/Dockerfile
index fae64ec..c408ae6 100644
--- a/postgres_9.5-alpine/Dockerfile
+++ b/postgres_9.5-alpine/Dockerfile
@@ -2,8 +2,16 @@
 FROM alpine:3.5
 
 # alpine includes "postgres" user/group in base install
-# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
-# /etc/group:34:postgres:x:70:
+#   /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
+#   /etc/group:34:postgres:x:70:
+# the home directory for the postgres user, however, is not created by default
+# see https://github.com/docker-library/postgres/issues/274
+RUN set -ex; \
+	postgresHome="$(getent passwd postgres)"; \
+	postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
+	[ "$postgresHome" = '/var/lib/postgresql' ]; \
+	mkdir -p "$postgresHome"; \
+	chown -R postgres:postgres "$postgresHome"
 
 # su-exec (gosu-compatible) is installed further down
 
diff --git a/postgres_alpine/Dockerfile b/postgres_alpine/Dockerfile
index 2e8a296..a97a47d 100644
--- a/postgres_alpine/Dockerfile
+++ b/postgres_alpine/Dockerfile
@@ -2,8 +2,16 @@
 FROM alpine:3.5
 
 # alpine includes "postgres" user/group in base install
-# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
-# /etc/group:34:postgres:x:70:
+#   /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
+#   /etc/group:34:postgres:x:70:
+# the home directory for the postgres user, however, is not created by default
+# see https://github.com/docker-library/postgres/issues/274
+RUN set -ex; \
+	postgresHome="$(getent passwd postgres)"; \
+	postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
+	[ "$postgresHome" = '/var/lib/postgresql' ]; \
+	mkdir -p "$postgresHome"; \
+	chown -R postgres:postgres "$postgresHome"
 
 # su-exec (gosu-compatible) is installed further down
 
diff --git a/python_2-alpine/Dockerfile b/python_2-alpine/Dockerfile
index fe299aa..d4e82c6 100644
--- a/python_2-alpine/Dockerfile
+++ b/python_2-alpine/Dockerfile
@@ -16,6 +16,8 @@ ENV PYTHON_VERSION 2.7.13
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& apk add --no-cache --virtual .fetch-deps \
@@ -67,10 +69,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_2-slim/Dockerfile b/python_2-slim/Dockerfile
index fa8a55d..423b498 100644
--- a/python_2-slim/Dockerfile
+++ b/python_2-slim/Dockerfile
@@ -20,6 +20,8 @@ ENV PYTHON_VERSION 2.7.13
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -65,10 +67,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_2-wheezy/Dockerfile b/python_2-wheezy/Dockerfile
index b14b748..b84805d 100644
--- a/python_2-wheezy/Dockerfile
+++ b/python_2-wheezy/Dockerfile
@@ -18,6 +18,8 @@ ENV PYTHON_VERSION 2.7.13
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -50,10 +52,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_2/Dockerfile b/python_2/Dockerfile
index 3c12478..a9ef20d 100644
--- a/python_2/Dockerfile
+++ b/python_2/Dockerfile
@@ -18,6 +18,8 @@ ENV PYTHON_VERSION 2.7.13
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -50,10 +52,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.3-alpine/Dockerfile b/python_3.3-alpine/Dockerfile
index 042ae7c..ddd987e 100644
--- a/python_3.3-alpine/Dockerfile
+++ b/python_3.3-alpine/Dockerfile
@@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.3.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& apk add --no-cache --virtual .fetch-deps \
@@ -77,10 +79,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.3-slim/Dockerfile b/python_3.3-slim/Dockerfile
index 648b8ab..fbce370 100644
--- a/python_3.3-slim/Dockerfile
+++ b/python_3.3-slim/Dockerfile
@@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.3.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -74,10 +76,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.3-wheezy/Dockerfile b/python_3.3-wheezy/Dockerfile
index 580513e..bcc85fe 100644
--- a/python_3.3-wheezy/Dockerfile
+++ b/python_3.3-wheezy/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.3.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.3/Dockerfile b/python_3.3/Dockerfile
index 0c17138..bc0e26d 100644
--- a/python_3.3/Dockerfile
+++ b/python_3.3/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.3.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.4-alpine/Dockerfile b/python_3.4-alpine/Dockerfile
index 684a954..2fec56f 100644
--- a/python_3.4-alpine/Dockerfile
+++ b/python_3.4-alpine/Dockerfile
@@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.4.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& apk add --no-cache --virtual .fetch-deps \
@@ -77,10 +79,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.4-slim/Dockerfile b/python_3.4-slim/Dockerfile
index f4ce201..20de5ef 100644
--- a/python_3.4-slim/Dockerfile
+++ b/python_3.4-slim/Dockerfile
@@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.4.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -74,10 +76,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.4-wheezy/Dockerfile b/python_3.4-wheezy/Dockerfile
index f6c1ce7..317b636 100644
--- a/python_3.4-wheezy/Dockerfile
+++ b/python_3.4-wheezy/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.4.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.4/Dockerfile b/python_3.4/Dockerfile
index 93bc245..550de65 100644
--- a/python_3.4/Dockerfile
+++ b/python_3.4/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.4.6
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.5-alpine/Dockerfile b/python_3.5-alpine/Dockerfile
index a867fb8..ffdb938 100644
--- a/python_3.5-alpine/Dockerfile
+++ b/python_3.5-alpine/Dockerfile
@@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.5.3
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& apk add --no-cache --virtual .fetch-deps \
@@ -77,10 +79,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.5-slim/Dockerfile b/python_3.5-slim/Dockerfile
index 422f81a..56bec62 100644
--- a/python_3.5-slim/Dockerfile
+++ b/python_3.5-slim/Dockerfile
@@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.5.3
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -74,10 +76,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_3.5-windowsservercore/Dockerfile b/python_3.5-windowsservercore/Dockerfile
index b15fbed..2859fd0 100644
--- a/python_3.5-windowsservercore/Dockerfile
+++ b/python_3.5-windowsservercore/Dockerfile
@@ -13,6 +13,8 @@ ENV PYTHON_RELEASE 3.5.3
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
 	Write-Host ('Downloading {0} ...' -f $url); \
@@ -40,12 +42,16 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
 	Write-Host 'Removing ...'; \
 	Remove-Item python.exe -Force; \
 	\
-	$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
-	Write-Host ('Installing {0} ...' -f $pipInstall); \
+	Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \
+# (using "python -m pip" instead of "pip" to avoid pip trying to remove itself while it's running; see also https://pip.readthedocs.io/en/stable/installing/#id6)
+	python -m pip install --no-cache-dir --upgrade --force-reinstall \
+		('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
+		('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \
+		('wheel=={0}' -f $env:PYTHON_WHEEL_VERSION) \
+	; \
 	\
 	Write-Host 'Verifying pip install ...'; \
 	pip --version; \
diff --git a/python_3.5/Dockerfile b/python_3.5/Dockerfile
index 85bf3bb..355f4d4 100644
--- a/python_3.5/Dockerfile
+++ b/python_3.5/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.5.3
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_alpine/Dockerfile b/python_alpine/Dockerfile
index b16146e..8dfef23 100644
--- a/python_alpine/Dockerfile
+++ b/python_alpine/Dockerfile
@@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.6.1
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& apk add --no-cache --virtual .fetch-deps \
@@ -77,10 +79,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_latest/Dockerfile b/python_latest/Dockerfile
index 6d9a1c4..e301557 100644
--- a/python_latest/Dockerfile
+++ b/python_latest/Dockerfile
@@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.6.1
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -59,10 +61,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_slim/Dockerfile b/python_slim/Dockerfile
index 7ebb1e8..fcdb9df 100644
--- a/python_slim/Dockerfile
+++ b/python_slim/Dockerfile
@@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.6.1
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN set -ex \
 	&& buildDeps=' \
@@ -74,10 +76,10 @@ RUN set -ex \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
-# then we use "pip list" to ensure we don't have more than one pip version installed
-# https://github.com/docker-library/python/pull/100
-	&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
+	&& pip3 install --no-cache-dir --upgrade --force-reinstall \
+		"pip==$PYTHON_PIP_VERSION" \
+		"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
+		"wheel==$PYTHON_WHEEL_VERSION" \
 	\
 	&& find /usr/local -depth \
 		\( \
diff --git a/python_windowsservercore/Dockerfile b/python_windowsservercore/Dockerfile
index ae508b1..00c827d 100644
--- a/python_windowsservercore/Dockerfile
+++ b/python_windowsservercore/Dockerfile
@@ -13,6 +13,8 @@ ENV PYTHON_RELEASE 3.6.1
 
 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
 ENV PYTHON_PIP_VERSION 9.0.1
+ENV PYTHON_SETUPTOOLS_VERSION 35.0.1
+ENV PYTHON_WHEEL_VERSION 0.29.0
 
 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
 	Write-Host ('Downloading {0} ...' -f $url); \
@@ -40,12 +42,16 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
 	Write-Host 'Removing ...'; \
 	Remove-Item python.exe -Force; \
 	\
-	$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
-	Write-Host ('Installing {0} ...' -f $pipInstall); \
+	Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
 # we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
 # https://github.com/docker-library/python/pull/143#issuecomment-241032683
-	pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \
+# (using "python -m pip" instead of "pip" to avoid pip trying to remove itself while it's running; see also https://pip.readthedocs.io/en/stable/installing/#id6)
+	python -m pip install --no-cache-dir --upgrade --force-reinstall \
+		('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
+		('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \
+		('wheel=={0}' -f $env:PYTHON_WHEEL_VERSION) \
+	; \
 	\
 	Write-Host 'Verifying pip install ...'; \
 	pip --version; \

@tianon
Copy link
Member Author

tianon commented Apr 26, 2017

Build test of #2896; 466df3c (docker, golang, nextcloud, postgres, python):

$ bashbrew build docker:17.05.0-ce-rc1
Building bashbrew/cache:b9f78f4d987a873512959c84cc6a56d95ebedf1f5c09e73927cfe003b1812054 (docker:17.05.0-ce-rc1)
Tagging docker:17.05.0-ce-rc1
Tagging docker:17.05.0-ce
Tagging docker:17.05.0
Tagging docker:17.05-rc
Tagging docker:rc

$ test/run.sh docker:17.05.0-ce-rc1
testing docker:17.05.0-ce-rc1
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build docker:17.05.0-ce-rc1-dind
Building bashbrew/cache:2253bfdb104e4704df8a0d10ffa0c02d20298b0ea09492b291ec9055fb1c4fd1 (docker:17.05.0-ce-rc1-dind)
Tagging docker:17.05.0-ce-rc1-dind
Tagging docker:17.05.0-ce-dind
Tagging docker:17.05.0-dind
Tagging docker:17.05-rc-dind
Tagging docker:rc-dind

$ test/run.sh docker:17.05.0-ce-rc1-dind
testing docker:17.05.0-ce-rc1-dind
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'docker-dind' [5/6]...passed
	'docker-registry-push-pull' [6/6]...passed


$ bashbrew build docker:17.05.0-ce-rc1-git
Building bashbrew/cache:6b1ee824ab5b58f81e9f93bfe2b5c074f487869eea72f7e0af55e1d6600e7300 (docker:17.05.0-ce-rc1-git)
Tagging docker:17.05.0-ce-rc1-git
Tagging docker:17.05.0-ce-git
Tagging docker:17.05.0-git
Tagging docker:17.05-rc-git
Tagging docker:rc-git

$ test/run.sh docker:17.05.0-ce-rc1-git
testing docker:17.05.0-ce-rc1-git
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build docker:17.04.0-ce
Building bashbrew/cache:cd17eb26f8780f032f4d0aed99fa86417e90deaed93fd26d72a826e27c1674cc (docker:17.04.0-ce)
Tagging docker:17.04.0-ce
Tagging docker:17.04.0
Tagging docker:17.04
Tagging docker:17
Tagging docker:latest
Tagging docker:edge

$ test/run.sh docker:17.04.0-ce
testing docker:17.04.0-ce
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build docker:17.04.0-ce-dind
Building bashbrew/cache:785ac7be1b585ad0961f0e45808e3dadb4c7544ef78dc5d6407cc9e20ec51d83 (docker:17.04.0-ce-dind)
Tagging docker:17.04.0-ce-dind
Tagging docker:17.04.0-dind
Tagging docker:17.04-dind
Tagging docker:17-dind
Tagging docker:dind
Tagging docker:edge-dind

$ test/run.sh docker:17.04.0-ce-dind
testing docker:17.04.0-ce-dind
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'docker-dind' [5/6]...passed
	'docker-registry-push-pull' [6/6]...passed


$ bashbrew build docker:17.04.0-ce-git
Building bashbrew/cache:a740a2f2e6ec0e16689a19521a2a6af112b651e40bc953e1977f49d1c9282d3e (docker:17.04.0-ce-git)
Tagging docker:17.04.0-ce-git
Tagging docker:17.04.0-git
Tagging docker:17.04-git
Tagging docker:17-git
Tagging docker:git
Tagging docker:edge-git

$ test/run.sh docker:17.04.0-ce-git
testing docker:17.04.0-ce-git
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build docker:17.03.1-ce
Building bashbrew/cache:06ceeffe8ff35959586e8d51564f7ddf111ad35e58b609e071de7f386d26c86c (docker:17.03.1-ce)
Tagging docker:17.03.1-ce
Tagging docker:17.03.1
Tagging docker:17.03
Tagging docker:stable

$ test/run.sh docker:17.03.1-ce
testing docker:17.03.1-ce
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build docker:17.03.1-ce-dind
Building bashbrew/cache:521cd1dec8c1ba7c8cdbe51916365458db7bd97230e481e14f3436ecd8a80d6b (docker:17.03.1-ce-dind)
Tagging docker:17.03.1-ce-dind
Tagging docker:17.03.1-dind
Tagging docker:17.03-dind
Tagging docker:stable-dind

$ test/run.sh docker:17.03.1-ce-dind
testing docker:17.03.1-ce-dind
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'docker-dind' [5/6]...passed
	'docker-registry-push-pull' [6/6]...passed


$ bashbrew build docker:17.03.1-ce-git
Building bashbrew/cache:b8bb535e0051cc511ca44de02518c507dceb39ba50c06c1f55cc7f367e8d5ad5 (docker:17.03.1-ce-git)
Tagging docker:17.03.1-ce-git
Tagging docker:17.03.1-git
Tagging docker:17.03-git
Tagging docker:stable-git

$ test/run.sh docker:17.03.1-ce-git
testing docker:17.03.1-ce-git
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build golang:1.7.5
Building bashbrew/cache:fa97790105a75e877783dfc90d14c27010b47dd9056cfb577bc4582b7e52604c (golang:1.7.5)
Tagging golang:1.7.5
Tagging golang:1.7

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


$ bashbrew build golang:1.7.5-onbuild
Building bashbrew/cache:b071baad11281e5ce8a7bbfd728ff72c2adcff5006182781d2500ad511c2ab28 (golang:1.7.5-onbuild)
Tagging golang:1.7.5-onbuild
Tagging golang:1.7-onbuild

$ test/run.sh golang:1.7.5-onbuild
testing golang:1.7.5-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build golang:1.7.5-wheezy
Building bashbrew/cache:cc617cbab89c1e8c5b430b4b66aa6dc84c012a84ae1c0a30307fbd2f70bfef6d (golang:1.7.5-wheezy)
Tagging golang:1.7.5-wheezy
Tagging golang:1.7-wheezy

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


$ bashbrew build golang:1.7.5-alpine
Building bashbrew/cache:573b07a6281958fb095e2f3d8a8c35155b6188c946563cc6e62ffe6e2d69a6de (golang:1.7.5-alpine)
Tagging golang:1.7.5-alpine
Tagging golang:1.7-alpine

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


$ bashbrew build golang:1.7.5-alpine3.5
Building bashbrew/cache:1a129e8710634108084a53f4cda68e1238b45663079e5a1c1e1895170efc3140 (golang:1.7.5-alpine3.5)
Tagging golang:1.7.5-alpine3.5
Tagging golang:1.7-alpine3.5

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


$ bashbrew build golang:1.7.5-windowsservercore
skipping "golang:1.7.5-windowsservercore" (due to unsatisfactory constraints ["windowsservercore"])

$ test/run.sh golang:1.7.5-windowsservercore
testing golang:1.7.5-windowsservercore
	image does not exist!


$ bashbrew build golang:1.7.5-nanoserver
skipping "golang:1.7.5-nanoserver" (due to unsatisfactory constraints ["nanoserver"])

$ test/run.sh golang:1.7.5-nanoserver
testing golang:1.7.5-nanoserver
	image does not exist!


$ bashbrew build golang:1.8.1
Building bashbrew/cache:c8723e5ce679eb5c508b0f290438d53e1b4809e7c1fa2553974b1e6148f34947 (golang:1.8.1)
Tagging golang:1.8.1
Tagging golang:1.8
Tagging golang:1
Tagging golang:latest

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


$ bashbrew build golang:1.8.1-onbuild
Building bashbrew/cache:b794b6adf6a37ee388942287aec0c935092916a179f50d31fdbccca49145203a (golang:1.8.1-onbuild)
Tagging golang:1.8.1-onbuild
Tagging golang:1.8-onbuild
Tagging golang:1-onbuild
Tagging golang:onbuild

$ test/run.sh golang:1.8.1-onbuild
testing golang:1.8.1-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build golang:1.8.1-stretch
Building bashbrew/cache:1fdac115b8e6be222418d8c2d65826ba6e64dfc1818d5d17a60196947d740292 (golang:1.8.1-stretch)
Tagging golang:1.8.1-stretch
Tagging golang:1.8-stretch
Tagging golang:1-stretch
Tagging golang:stretch

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


$ bashbrew build golang:1.8.1-alpine
Building bashbrew/cache:7241bfe5e2ff66c5be38f7c89010997884232d55e38e661a6700c10826c14751 (golang:1.8.1-alpine)
Tagging golang:1.8.1-alpine
Tagging golang:1.8-alpine
Tagging golang:1-alpine
Tagging golang:alpine

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


$ bashbrew build golang:1.8.1-windowsservercore
skipping "golang:1.8.1-windowsservercore" (due to unsatisfactory constraints ["windowsservercore"])

$ test/run.sh golang:1.8.1-windowsservercore
testing golang:1.8.1-windowsservercore
	image does not exist!


$ bashbrew build golang:1.8.1-nanoserver
skipping "golang:1.8.1-nanoserver" (due to unsatisfactory constraints ["nanoserver"])

$ test/run.sh golang:1.8.1-nanoserver
testing golang:1.8.1-nanoserver
	image does not exist!
$ bashbrew build nextcloud:10.0.5-apache
Building bashbrew/cache:35de49894ac2425997f1a4d0bb27694eba815f9a5f678f6965b8fdc7c027e2d6 (nextcloud:10.0.5-apache)
Tagging nextcloud:10.0.5-apache
Tagging nextcloud:10.0-apache
Tagging nextcloud:10-apache
Tagging nextcloud:10.0.5
Tagging nextcloud:10.0
Tagging nextcloud:10

$ test/run.sh nextcloud:10.0.5-apache
testing nextcloud:10.0.5-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:10.0.5-fpm
Building bashbrew/cache:a0c9850c1e4c8c65822523766c47323d376f63e313a685c4a0db8b1a070240fc (nextcloud:10.0.5-fpm)
Tagging nextcloud:10.0.5-fpm
Tagging nextcloud:10.0-fpm
Tagging nextcloud:10-fpm

$ test/run.sh nextcloud:10.0.5-fpm
testing nextcloud:10.0.5-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:11.0.3-apache
Building bashbrew/cache:097351caa4ca1eca7d342545184c3a6627a7271395ec597e97ab04d3f0101400 (nextcloud:11.0.3-apache)
Tagging nextcloud:11.0.3-apache
Tagging nextcloud:11.0-apache
Tagging nextcloud:11-apache
Tagging nextcloud:apache
Tagging nextcloud:11.0.3
Tagging nextcloud:11.0
Tagging nextcloud:11
Tagging nextcloud:latest

$ test/run.sh nextcloud:11.0.3-apache
testing nextcloud:11.0.3-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:11.0.3-fpm
Building bashbrew/cache:0ac7aa18deb9e838fb51b07eee25c9c7fe618488b6615cf2591c6c409d8a186f (nextcloud:11.0.3-fpm)
Tagging nextcloud:11.0.3-fpm
Tagging nextcloud:11.0-fpm
Tagging nextcloud:11-fpm
Tagging nextcloud:fpm

$ test/run.sh nextcloud:11.0.3-fpm
testing nextcloud:11.0.3-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:9.0.58-apache
Building bashbrew/cache:2ca50e4ec47b23570a751724f7fcc4912e7d897d2de89bce8da5d62156dda1a5 (nextcloud:9.0.58-apache)
Tagging nextcloud:9.0.58-apache
Tagging nextcloud:9.0-apache
Tagging nextcloud:9-apache
Tagging nextcloud:9.0.58
Tagging nextcloud:9.0
Tagging nextcloud:9

$ test/run.sh nextcloud:9.0.58-apache
testing nextcloud:9.0.58-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:9.0.58-fpm
Building bashbrew/cache:f4741ab28c98e20de7869f9fb385645f3f11405e9285621de3cb9b42dc980933 (nextcloud:9.0.58-fpm)
Tagging nextcloud:9.0.58-fpm
Tagging nextcloud:9.0-fpm
Tagging nextcloud:9-fpm

$ test/run.sh nextcloud:9.0.58-fpm
testing nextcloud:9.0.58-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build postgres:9.6.2
Building bashbrew/cache:cb52bc5d4dbc439c8760f7139fe6efe65a1584917f2d33f3f3abfc3cefaff03b (postgres:9.6.2)
Tagging postgres:9.6.2
Tagging postgres:9.6
Tagging postgres:9
Tagging postgres:latest

$ test/run.sh postgres:9.6.2
testing postgres:9.6.2
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.6.2-alpine
Building bashbrew/cache:38b1658c16c4f0fb4f91c358f7cff98be9aee795a9c33b209d4fdc0bd032cc3b (postgres:9.6.2-alpine)
Tagging postgres:9.6.2-alpine
Tagging postgres:9.6-alpine
Tagging postgres:9-alpine
Tagging postgres:alpine

$ test/run.sh postgres:9.6.2-alpine
testing postgres:9.6.2-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.5.6
Building bashbrew/cache:42ccb9e2be3de98a5b59843fc8e461f3c0d1ce7b30010830f2e2d586162928eb (postgres:9.5.6)
Tagging postgres:9.5.6
Tagging postgres:9.5

$ test/run.sh postgres:9.5.6
testing postgres:9.5.6
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.5.6-alpine
Building bashbrew/cache:aae733c7285585604859419801e30e58c3b6b69d4943c58df84a2a894f3a8444 (postgres:9.5.6-alpine)
Tagging postgres:9.5.6-alpine
Tagging postgres:9.5-alpine

$ test/run.sh postgres:9.5.6-alpine
testing postgres:9.5.6-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.4.11
Building bashbrew/cache:fb2bc7218f8361c0db4dd4dfc16d1b083cee7f552f28cd8777ba0b4efe4517aa (postgres:9.4.11)
Tagging postgres:9.4.11
Tagging postgres:9.4

$ test/run.sh postgres:9.4.11
testing postgres:9.4.11
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.4.11-alpine
Building bashbrew/cache:84c468c3378abdae449812296d8d6511d53dedac9bad6080fe706d99ddfd78d1 (postgres:9.4.11-alpine)
Tagging postgres:9.4.11-alpine
Tagging postgres:9.4-alpine

$ test/run.sh postgres:9.4.11-alpine
testing postgres:9.4.11-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.3.16
Building bashbrew/cache:7b09ec73bd020e24eed272ed9d14f25a99d3e99f558e036beecf966f037cbb0d (postgres:9.3.16)
Tagging postgres:9.3.16
Tagging postgres:9.3

$ test/run.sh postgres:9.3.16
testing postgres:9.3.16
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6]......passed


$ bashbrew build postgres:9.3.16-alpine
Building bashbrew/cache:e14df43f6889917689262eb8b3c907d7ea4fbb2d86d56c52d01595bdf5557a5c (postgres:9.3.16-alpine)
Tagging postgres:9.3.16-alpine
Tagging postgres:9.3-alpine

$ test/run.sh postgres:9.3.16-alpine
testing postgres:9.3.16-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.2.20
Building bashbrew/cache:b14e6a8007637b8b5142af51a3d526abed891a1bee2003739d4dabb72853ca22 (postgres:9.2.20)
Tagging postgres:9.2.20
Tagging postgres:9.2

$ test/run.sh postgres:9.2.20
testing postgres:9.2.20
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed


$ bashbrew build postgres:9.2.20-alpine
Building bashbrew/cache:b212df26c7604a639dee8c79c3391b66830cf7c77a2b9059282d10fee3ad3591 (postgres:9.2.20-alpine)
Tagging postgres:9.2.20-alpine
Tagging postgres:9.2-alpine

$ test/run.sh postgres:9.2.20-alpine
testing postgres:9.2.20-alpine
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'postgres-basics' [5/6].....passed
	'postgres-initdb' [6/6].....passed
$ bashbrew build python:2.7.13
Building bashbrew/cache:e2a4aeb942f06360df2f075b9b13fb9619c832ee16a883c1ec2aa1c2c6790136 (python:2.7.13)
Tagging python:2.7.13
Tagging python:2.7
Tagging python:2

$ test/run.sh python:2.7.13
testing python:2.7.13
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:2.7.13-slim
Building bashbrew/cache:7e993d45b2ee5a8b8c1e25e81f418c8e7d19e88e362538185685cebe0c768f25 (python:2.7.13-slim)
Tagging python:2.7.13-slim
Tagging python:2.7-slim
Tagging python:2-slim

$ test/run.sh python:2.7.13-slim
testing python:2.7.13-slim
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:2.7.13-alpine
Building bashbrew/cache:eeb8f80ebf50f04b3fb573a90de721ea525a67afb34dd4f217762c547c0ac4b1 (python:2.7.13-alpine)
Tagging python:2.7.13-alpine
Tagging python:2.7-alpine
Tagging python:2-alpine

$ test/run.sh python:2.7.13-alpine
testing python:2.7.13-alpine
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:2.7.13-wheezy
Building bashbrew/cache:aa8c9698eaee8cdb72f5e346ec7502819bf2c69f67e3e4453e140d4b0c7b6a11 (python:2.7.13-wheezy)
Tagging python:2.7.13-wheezy
Tagging python:2.7-wheezy
Tagging python:2-wheezy

$ test/run.sh python:2.7.13-wheezy
testing python:2.7.13-wheezy
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:2.7.13-onbuild
Building bashbrew/cache:cb4a9b58c1bd8b48e5ac87fe9e164f1cd51304ea54d9c46fbabae08c3faf1098 (python:2.7.13-onbuild)
Tagging python:2.7.13-onbuild
Tagging python:2.7-onbuild
Tagging python:2-onbuild

$ test/run.sh python:2.7.13-onbuild
testing python:2.7.13-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build python:2.7.13-windowsservercore
skipping "python:2.7.13-windowsservercore" (due to unsatisfactory constraints ["windowsservercore"])

$ test/run.sh python:2.7.13-windowsservercore
testing python:2.7.13-windowsservercore
	image does not exist!


$ bashbrew build python:3.3.6
Building bashbrew/cache:84974a271be1dc5c49d479e071331bd7248baa3510c45e3db8afeef4a076a765 (python:3.3.6)
Tagging python:3.3.6
Tagging python:3.3

$ test/run.sh python:3.3.6
testing python:3.3.6
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.3.6-slim
Building bashbrew/cache:a14f73919341c111d3909d37edd570b2f504074d6b23ee01d923a7d8c23f81c7 (python:3.3.6-slim)
Tagging python:3.3.6-slim
Tagging python:3.3-slim

$ test/run.sh python:3.3.6-slim
testing python:3.3.6-slim
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.3.6-alpine
Building bashbrew/cache:3c0f180be2becc89e99b2ce01641397af8bd54229fe3562bf4f2d027d5db207a (python:3.3.6-alpine)
Tagging python:3.3.6-alpine
Tagging python:3.3-alpine

$ test/run.sh python:3.3.6-alpine
testing python:3.3.6-alpine
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.3.6-wheezy
Building bashbrew/cache:de96fa2b7ebb331837cc3f875775e91f0cbda5eb4a931d285ec0ac64e7fc5ff3 (python:3.3.6-wheezy)
Tagging python:3.3.6-wheezy
Tagging python:3.3-wheezy

$ test/run.sh python:3.3.6-wheezy
testing python:3.3.6-wheezy
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.3.6-onbuild
Building bashbrew/cache:a542ec6d403690f41fde0629d324dea50653a9379e61d669c65a6ebdade6f1c7 (python:3.3.6-onbuild)
Tagging python:3.3.6-onbuild
Tagging python:3.3-onbuild

$ test/run.sh python:3.3.6-onbuild
testing python:3.3.6-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build python:3.4.6
Building bashbrew/cache:4183a8927d924804ae9c6e9b2a1f8075cafe358de3bc0a5cb6dcc783466b1cea (python:3.4.6)
Tagging python:3.4.6
Tagging python:3.4

$ test/run.sh python:3.4.6
testing python:3.4.6
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.4.6-slim
Building bashbrew/cache:27f5863eb81bfd7c95dbc492763f5e7bd7d46a0c2b6fd47fcc5b12ddb74fe5d9 (python:3.4.6-slim)
Tagging python:3.4.6-slim
Tagging python:3.4-slim

$ test/run.sh python:3.4.6-slim
testing python:3.4.6-slim
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.4.6-alpine
Building bashbrew/cache:ac19c8929a6a0d3f3e6b0938f42f4e183bb906c002be72ed61b3c1a3bf59bcfe (python:3.4.6-alpine)
Tagging python:3.4.6-alpine
Tagging python:3.4-alpine

$ test/run.sh python:3.4.6-alpine
testing python:3.4.6-alpine
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.4.6-wheezy
Building bashbrew/cache:a5802ac9ef0c71806fef5d5740906216484bbf2bda955184f0b7e738e49e162b (python:3.4.6-wheezy)
Tagging python:3.4.6-wheezy
Tagging python:3.4-wheezy

$ test/run.sh python:3.4.6-wheezy
testing python:3.4.6-wheezy
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.4.6-onbuild
Building bashbrew/cache:89001d3ec7d6fb81cb5ff140b16c64b6e36187418bc31ac354b0c4220abb8f34 (python:3.4.6-onbuild)
Tagging python:3.4.6-onbuild
Tagging python:3.4-onbuild

$ test/run.sh python:3.4.6-onbuild
testing python:3.4.6-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build python:3.5.3
Building bashbrew/cache:6c9518064ad81be8922116afef5599f4f227204a7f3b0cf10a0b509c6405add6 (python:3.5.3)
Tagging python:3.5.3
Tagging python:3.5

$ test/run.sh python:3.5.3
testing python:3.5.3
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.5.3-slim
Building bashbrew/cache:c4940659a696da24b698d0484f3c038c9e0f4938399bfee3900ee1afef71351a (python:3.5.3-slim)
Tagging python:3.5.3-slim
Tagging python:3.5-slim

$ test/run.sh python:3.5.3-slim
testing python:3.5.3-slim
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.5.3-alpine
Building bashbrew/cache:fe1fb4063c68a2f270999852a81b7ae3c7af54be9674a1b9c0b471b6916c238e (python:3.5.3-alpine)
Tagging python:3.5.3-alpine
Tagging python:3.5-alpine

$ test/run.sh python:3.5.3-alpine
testing python:3.5.3-alpine
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.5.3-onbuild
Building bashbrew/cache:0c943668eef4e1f0eee0cb9720a966d62c1b1d87fb80751355910e2bb44224da (python:3.5.3-onbuild)
Tagging python:3.5.3-onbuild
Tagging python:3.5-onbuild

$ test/run.sh python:3.5.3-onbuild
testing python:3.5.3-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build python:3.5.3-windowsservercore
skipping "python:3.5.3-windowsservercore" (due to unsatisfactory constraints ["windowsservercore"])

$ test/run.sh python:3.5.3-windowsservercore
testing python:3.5.3-windowsservercore
	image does not exist!


$ bashbrew build python:3.6.1
Building bashbrew/cache:6be98067cd63319891df0c6ed4838377c4884349257c8ad39a9e3415746e836f (python:3.6.1)
Tagging python:3.6.1
Tagging python:3.6
Tagging python:3
Tagging python:latest

$ test/run.sh python:3.6.1
testing python:3.6.1
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.6.1-slim
Building bashbrew/cache:9bab4ee59beac46342039012cc2760a59c78a9e33555f8c4d8cc757271451208 (python:3.6.1-slim)
Tagging python:3.6.1-slim
Tagging python:3.6-slim
Tagging python:3-slim
Tagging python:slim

$ test/run.sh python:3.6.1-slim
testing python:3.6.1-slim
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.6.1-alpine
Building bashbrew/cache:8fd0fd6d21798d43da61debc26efd8311b7e1cc58f11f9f2cb6c26938d9f2b2b (python:3.6.1-alpine)
Tagging python:3.6.1-alpine
Tagging python:3.6-alpine
Tagging python:3-alpine
Tagging python:alpine

$ test/run.sh python:3.6.1-alpine
testing python:3.6.1-alpine
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'python-hy' [5/8]...passed
	'python-imports' [6/8]...passed
	'python-pip-requests-ssl' [7/8]...passed
	'python-sqlite3' [8/8]...passed


$ bashbrew build python:3.6.1-onbuild
Building bashbrew/cache:e8eb42f9e8e3e0a409dd64b43433e80f42449a41f8a06ba7996376dc1b5d09a0 (python:3.6.1-onbuild)
Tagging python:3.6.1-onbuild
Tagging python:3.6-onbuild
Tagging python:3-onbuild
Tagging python:onbuild

$ test/run.sh python:3.6.1-onbuild
testing python:3.6.1-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build python:3.6.1-windowsservercore
skipping "python:3.6.1-windowsservercore" (due to unsatisfactory constraints ["windowsservercore"])

$ test/run.sh python:3.6.1-windowsservercore
testing python:3.6.1-windowsservercore
	image does not exist!

The following images failed at least one test:

  • golang:
    • golang:1.7.5-windowsservercore
    • golang:1.7.5-nanoserver
    • golang:1.8.1-windowsservercore
    • golang:1.8.1-nanoserver
  • python:
    • python:2.7.13-windowsservercore
    • python:3.5.3-windowsservercore
    • python:3.6.1-windowsservercore

@tianon
Copy link
Member Author

tianon commented Apr 26, 2017

$ bashbrew build 2>/dev/null https://github.com/infosiftr/stackbrew/raw/update-docker-library/library/{python,golang}
Building bashbrew/cache:868ae0dea96b393a31504e3781c2e31be0002c5dc021e26c6f43525a9d8894df (python:2.7.13-windowsservercore)
Tagging python:2.7.13-windowsservercore
Tagging python:2.7-windowsservercore
Tagging python:2-windowsservercore
Building bashbrew/cache:27d842ce53c78998e0b2505ae07ed8fbc892b8289d79e04b5aff67bca38468e2 (python:3.5.3-windowsservercore)
Tagging python:3.5.3-windowsservercore
Tagging python:3.5-windowsservercore
Building bashbrew/cache:e3a0c4e2c50d80915b55971d9bb90dc67ef2ab16528fb224eb9fc034e3477990 (python:3.6.1-windowsservercore)
Tagging python:3.6.1-windowsservercore
Tagging python:3.6-windowsservercore
Tagging python:3-windowsservercore
Tagging python:windowsservercore
Building bashbrew/cache:89ebd164a7097172d3b711400d79793b428f0b4cb11b9ef35b16e8bc07b349c6 (golang:1.7.5-windowsservercore)
Tagging golang:1.7.5-windowsservercore
Tagging golang:1.7-windowsservercore
Building bashbrew/cache:a0f57ef3212e5e2bf0d461da8eec8d3ebc9d16a4195a2f54dfa15bc724e4c969 (golang:1.7.5-nanoserver)
Tagging golang:1.7.5-nanoserver
Tagging golang:1.7-nanoserver
Building bashbrew/cache:356816b12887f6021eed7f5a9606d8eaaab1e0758e58ef281db38f364766de40 (golang:1.8.1-windowsservercore)
Tagging golang:1.8.1-windowsservercore
Tagging golang:1.8-windowsservercore
Tagging golang:1-windowsservercore
Tagging golang:windowsservercore
Building bashbrew/cache:3487cc2756c12a845399af8d3eb6f763f020d95dff52f468ab117d622246d03a (golang:1.8.1-nanoserver)
Tagging golang:1.8.1-nanoserver
Tagging golang:1.8-nanoserver
Tagging golang:1-nanoserver
Tagging golang:nanoserver

@yosifkit yosifkit merged commit 5c861ba into docker-library:master Apr 26, 2017
@yosifkit yosifkit deleted the update-docker-library branch April 26, 2017 19: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