Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update docker-library images #2636

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

tianon
Copy link
Member

@tianon tianon commented Feb 8, 2017

- `mongo`: use `numactl` for `mongos` too (docker-library/mongo#138)
- `percona`: 5.6.35-80.0-1.jessie
- `redmine`: fix `passenger` variants (docker-library/redmine#56)
- `rocket.chat`: 0.51.0
@tianon
Copy link
Member Author

tianon commented Feb 8, 2017

diff --git a/mongo_3.0/docker-entrypoint.sh b/mongo_3.0/docker-entrypoint.sh
index caf982b..acae0e2 100755
--- a/mongo_3.0/docker-entrypoint.sh
+++ b/mongo_3.0/docker-entrypoint.sh
@@ -6,12 +6,17 @@ if [ "${1:0:1}" = '-' ]; then
 fi
 
 # allow the container to be started with `--user`
-if [ "$1" = 'mongod' -a "$(id -u)" = '0' ]; then
-	chown -R mongodb /data/configdb /data/db
+# all mongo* commands should be dropped to the correct user
+if [[ "$1" == mongo* ]] && [ "$(id -u)" = '0' ]; then
+	if [ "$1" = 'mongod' ]; then
+		chown -R mongodb /data/configdb /data/db
+	fi
 	exec gosu mongodb "$BASH_SOURCE" "$@"
 fi
 
-if [ "$1" = 'mongod' ]; then
+# you should use numactl to start your mongod instances, including the config servers, mongos instances, and any clients.
+# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux
+if [[ "$1" == mongo* ]]; then
 	numa='numactl --interleave=all'
 	if $numa true &> /dev/null; then
 		set -- $numa "$@"
diff --git a/mongo_3.2/docker-entrypoint.sh b/mongo_3.2/docker-entrypoint.sh
index caf982b..acae0e2 100755
--- a/mongo_3.2/docker-entrypoint.sh
+++ b/mongo_3.2/docker-entrypoint.sh
@@ -6,12 +6,17 @@ if [ "${1:0:1}" = '-' ]; then
 fi
 
 # allow the container to be started with `--user`
-if [ "$1" = 'mongod' -a "$(id -u)" = '0' ]; then
-	chown -R mongodb /data/configdb /data/db
+# all mongo* commands should be dropped to the correct user
+if [[ "$1" == mongo* ]] && [ "$(id -u)" = '0' ]; then
+	if [ "$1" = 'mongod' ]; then
+		chown -R mongodb /data/configdb /data/db
+	fi
 	exec gosu mongodb "$BASH_SOURCE" "$@"
 fi
 
-if [ "$1" = 'mongod' ]; then
+# you should use numactl to start your mongod instances, including the config servers, mongos instances, and any clients.
+# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux
+if [[ "$1" == mongo* ]]; then
 	numa='numactl --interleave=all'
 	if $numa true &> /dev/null; then
 		set -- $numa "$@"
diff --git a/mongo_latest/docker-entrypoint.sh b/mongo_latest/docker-entrypoint.sh
index caf982b..acae0e2 100755
--- a/mongo_latest/docker-entrypoint.sh
+++ b/mongo_latest/docker-entrypoint.sh
@@ -6,12 +6,17 @@ if [ "${1:0:1}" = '-' ]; then
 fi
 
 # allow the container to be started with `--user`
-if [ "$1" = 'mongod' -a "$(id -u)" = '0' ]; then
-	chown -R mongodb /data/configdb /data/db
+# all mongo* commands should be dropped to the correct user
+if [[ "$1" == mongo* ]] && [ "$(id -u)" = '0' ]; then
+	if [ "$1" = 'mongod' ]; then
+		chown -R mongodb /data/configdb /data/db
+	fi
 	exec gosu mongodb "$BASH_SOURCE" "$@"
 fi
 
-if [ "$1" = 'mongod' ]; then
+# you should use numactl to start your mongod instances, including the config servers, mongos instances, and any clients.
+# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux
+if [[ "$1" == mongo* ]]; then
 	numa='numactl --interleave=all'
 	if $numa true &> /dev/null; then
 		set -- $numa "$@"
diff --git a/percona_5.6/Dockerfile b/percona_5.6/Dockerfile
index d7503b6..750a445 100644
--- a/percona_5.6/Dockerfile
+++ b/percona_5.6/Dockerfile
@@ -50,7 +50,7 @@ RUN set -ex; \
 RUN echo 'deb https://repo.percona.com/apt jessie main' > /etc/apt/sources.list.d/percona.list
 
 ENV PERCONA_MAJOR 5.6
-ENV PERCONA_VERSION 5.6.34-79.1-1.jessie
+ENV PERCONA_VERSION 5.6.35-80.0-1.jessie
 
 # the "/var/lib/mysql" stuff here is because the mysql-server postinst doesn't have an explicit way to disable the mysql_install_db codepath besides having a database already "configured" (ie, stuff in /var/lib/mysql/mysql)
 # also, we set debconf keys to make APT a little quieter
diff --git a/redmine_3.1-passenger/Dockerfile b/redmine_3.1-passenger/Dockerfile
index 2c23ccb..789f8eb 100644
--- a/redmine_3.1-passenger/Dockerfile
+++ b/redmine_3.1-passenger/Dockerfile
@@ -1,6 +1,7 @@
 FROM redmine:3.1
 
 ENV PASSENGER_VERSION 5.1.2
+
 RUN buildDeps=' \
 		make \
 	' \
@@ -8,8 +9,10 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \
 	&& gem install passenger --version "$PASSENGER_VERSION" \
 	&& apt-get purge -y --auto-remove $buildDeps
+
+# pre-download the PassengerAgent and the NGINX engine
 RUN set -x \
 	&& passenger-config install-agent \
-	&& passenger-config install-standalone-runtime
+	&& passenger-config download-nginx-engine
 
 CMD ["passenger", "start"]
diff --git a/redmine_3.2-passenger/Dockerfile b/redmine_3.2-passenger/Dockerfile
index dad7b2f..242a574 100644
--- a/redmine_3.2-passenger/Dockerfile
+++ b/redmine_3.2-passenger/Dockerfile
@@ -1,6 +1,7 @@
 FROM redmine:3.2
 
 ENV PASSENGER_VERSION 5.1.2
+
 RUN buildDeps=' \
 		make \
 	' \
@@ -8,8 +9,10 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \
 	&& gem install passenger --version "$PASSENGER_VERSION" \
 	&& apt-get purge -y --auto-remove $buildDeps
+
+# pre-download the PassengerAgent and the NGINX engine
 RUN set -x \
 	&& passenger-config install-agent \
-	&& passenger-config install-standalone-runtime
+	&& passenger-config download-nginx-engine
 
 CMD ["passenger", "start"]
diff --git a/redmine_passenger/Dockerfile b/redmine_passenger/Dockerfile
index a856c71..79c1dac 100644
--- a/redmine_passenger/Dockerfile
+++ b/redmine_passenger/Dockerfile
@@ -1,6 +1,7 @@
 FROM redmine:3.3
 
 ENV PASSENGER_VERSION 5.1.2
+
 RUN buildDeps=' \
 		make \
 	' \
@@ -8,8 +9,10 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \
 	&& gem install passenger --version "$PASSENGER_VERSION" \
 	&& apt-get purge -y --auto-remove $buildDeps
+
+# pre-download the PassengerAgent and the NGINX engine
 RUN set -x \
 	&& passenger-config install-agent \
-	&& passenger-config install-standalone-runtime
+	&& passenger-config download-nginx-engine
 
 CMD ["passenger", "start"]
diff --git a/rocket.chat_latest/Dockerfile b/rocket.chat_latest/Dockerfile
index 9347709..d3cc056 100644
--- a/rocket.chat_latest/Dockerfile
+++ b/rocket.chat_latest/Dockerfile
@@ -11,7 +11,7 @@ VOLUME /app/uploads
 # gpg: key 4FD08014: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported
 RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104
 
-ENV RC_VERSION 0.50.1
+ENV RC_VERSION 0.51.0
 
 WORKDIR /app
 

@tianon
Copy link
Member Author

tianon commented Feb 8, 2017

$ bashbrew build 2>/dev/null https://github.com/infosiftr/stackbrew/raw/update-docker-library/library/mongo
Using bashbrew/cache:e36ff8402241d2da8e31adf4bf85a5ec28628e58e19358b6eaea50f3c1577ef7 (mongo:3.0.14-windowsservercore)
Tagging mongo:3.0.14-windowsservercore
Tagging mongo:3.0-windowsservercore
Using bashbrew/cache:143011b7f2c8562a188b8ed88967338d7cc670abb99f99b91ce1761dabcb1503 (mongo:3.2.12-windowsservercore)
Tagging mongo:3.2.12-windowsservercore
Tagging mongo:3.2-windowsservercore
Using bashbrew/cache:1cda5c7ec8005852a0cce10e47f35e441898ae22e0fbb49eaa4b4f89765fb6dc (mongo:3.4.2-windowsservercore)
Tagging mongo:3.4.2-windowsservercore
Tagging mongo:3.4-windowsservercore
Tagging mongo:3-windowsservercore
Tagging mongo:windowsservercore

@tianon
Copy link
Member Author

tianon commented Feb 8, 2017

Build test of #2636; 4bd1b0e (mongo, percona, redmine, rocket.chat):

$ bashbrew build mongo:3.0.14
Using bashbrew/cache:2b9ce391e59897af9c0096b1308a870eea81c1ad74e9afcc4ad6593370fc0f60 (mongo:3.0.14)
Tagging mongo:3.0.14
Tagging mongo:3.0

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


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

$ test/run.sh mongo:3.0.14-windowsservercore
testing mongo:3.0.14-windowsservercore
	image does not exist!


$ bashbrew build mongo:3.2.12
Building bashbrew/cache:8d234dd8e1bd15f857ad74422ad2e3452c1c61771cd1014e0404ab1a1e23c567 (mongo:3.2.12)
Tagging mongo:3.2.12
Tagging mongo:3.2

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


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

$ test/run.sh mongo:3.2.12-windowsservercore
testing mongo:3.2.12-windowsservercore
	image does not exist!


$ bashbrew build mongo:3.4.2
Building bashbrew/cache:d18d938644833c01c659ca9ed59538c75773ffa1ce25fc2e8d5d32f8d1eea9c1 (mongo:3.4.2)
Tagging mongo:3.4.2
Tagging mongo:3.4
Tagging mongo:3
Tagging mongo:latest

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


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

$ test/run.sh mongo:3.4.2-windowsservercore
testing mongo:3.4.2-windowsservercore
	image does not exist!
$ bashbrew build percona:5.7.17
Building bashbrew/cache:04f41e69246a3b5feb3a01b1fa3e8ea5af357fae96871b690cde10c44377536d (percona:5.7.17)
Tagging percona:5.7.17
Tagging percona:5.7
Tagging percona:5
Tagging percona:latest

$ test/run.sh percona:5.7.17
testing percona:5.7.17
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'mysql-basics' [5/7].........passed
	'mysql-initdb' [6/7].........passed
	'mysql-log-bin' [7/7].........passed


$ bashbrew build percona:5.6.35
Building bashbrew/cache:287aee880d04d73c5559bd2bdd7b8daf8a18f21b9d11cc479cb6f0445f1ae169 (percona:5.6.35)
Tagging percona:5.6.35
Tagging percona:5.6

$ test/run.sh percona:5.6.35
testing percona:5.6.35
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'mysql-basics' [5/7].......passed
	'mysql-initdb' [6/7]........passed
	'mysql-log-bin' [7/7].......passed


$ bashbrew build percona:5.5.54
Building bashbrew/cache:5885bf1a17c5fb8c54d5182dbb758c397923f3d5c2fb52f9bc70693acbe60869 (percona:5.5.54)
Tagging percona:5.5.54
Tagging percona:5.5

$ test/run.sh percona:5.5.54
testing percona:5.5.54
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'mysql-basics' [5/7]......passed
	'mysql-initdb' [6/7]......passed
	'mysql-log-bin' [7/7]......passed
$ bashbrew build redmine:3.1.7
Using bashbrew/cache:79ad29c5d23739d426ad68876fd9c62443d2e85a0cf621c854da50d25183734e (redmine:3.1.7)
Tagging redmine:3.1.7
Tagging redmine:3.1

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


$ bashbrew build redmine:3.1.7-passenger
Building bashbrew/cache:6d698a07dd28c08b49267565bc5a97eff6c62ee0f0d3f758238576e41a75fe94 (redmine:3.1.7-passenger)
Tagging redmine:3.1.7-passenger
Tagging redmine:3.1-passenger

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


$ bashbrew build redmine:3.2.5
Using bashbrew/cache:816ac7b843e369638703ae670f483c2d17a2acfad31fa6de4b71ae4459b7127e (redmine:3.2.5)
Tagging redmine:3.2.5
Tagging redmine:3.2

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


$ bashbrew build redmine:3.2.5-passenger
Building bashbrew/cache:c9622ea84c784bc8b1b98414a7f5d37866a5c962774decacd565ecb713dd0f22 (redmine:3.2.5-passenger)
Tagging redmine:3.2.5-passenger
Tagging redmine:3.2-passenger

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


$ bashbrew build redmine:3.3.2
Using bashbrew/cache:af601180667cc06aecb69dda91894247a3684a4f632868c80c493bf22c846c28 (redmine:3.3.2)
Tagging redmine:3.3.2
Tagging redmine:3.3
Tagging redmine:3
Tagging redmine:latest

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


$ bashbrew build redmine:3.3.2-passenger
Building bashbrew/cache:ca6828970b7ceb3e991d2aa90277d8a63760da6505e6ac98e055b7fbc33120eb (redmine:3.3.2-passenger)
Tagging redmine:3.3.2-passenger
Tagging redmine:3.3-passenger
Tagging redmine:3-passenger
Tagging redmine:passenger

$ test/run.sh redmine:3.3.2-passenger
testing redmine:3.3.2-passenger
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5].........passed
$ bashbrew build rocket.chat:0.51.0
Building bashbrew/cache:d9e403a4d268a289e7507cac99da1d0a50deaa9b3695732e0436aebfd98202eb (rocket.chat:0.51.0)
Tagging rocket.chat:0.51.0
Tagging rocket.chat:0.51
Tagging rocket.chat:0
Tagging rocket.chat:latest

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

The following images failed at least one test:

  • mongo:
    • mongo:3.0.14-windowsservercore
    • mongo:3.2.12-windowsservercore
    • mongo:3.4.2-windowsservercore

@yosifkit yosifkit merged commit 260df91 into docker-library:master Feb 8, 2017
@yosifkit yosifkit deleted the update-docker-library branch February 8, 2017 21:35
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.

None yet

3 participants