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 mysql #7568

Merged
merged 1 commit into from
Mar 4, 2020
Merged

Update mysql #7568

merged 1 commit into from
Mar 4, 2020

Conversation

tianon
Copy link
Member

@tianon tianon commented Mar 4, 2020

Changes:

Changes:

- docker-library/mysql@d284e15: Merge pull request docker-library/mysql#643 from infosiftr/ls
- docker-library/mysql@756df2e: Merge pull request docker-library/mysql#627 from inductor/feature/update_debian_buster
- docker-library/mysql@bc26ed3: Restore fix for silently skipped init scripts
@tianon
Copy link
Member Author

tianon commented Mar 4, 2020

Diff:
diff --git a/mysql_5.6/docker-entrypoint.sh b/mysql_5.6/docker-entrypoint.sh
index 6256a08..e7dd759 100755
--- a/mysql_5.6/docker-entrypoint.sh
+++ b/mysql_5.6/docker-entrypoint.sh
@@ -341,6 +341,10 @@ _main() {
 		# there's no database, so it needs to be initialized
 		if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
 			docker_verify_minimum_env
+
+			# check dir permissions to reduce likelihood of half-initialized database
+			ls /docker-entrypoint-initdb.d/ > /dev/null
+
 			docker_init_database_dir "$@"
 
 			mysql_note "Starting temporary server"
diff --git a/mysql_5/Dockerfile b/mysql_5/Dockerfile
index 714fdd2..ae03462 100644
--- a/mysql_5/Dockerfile
+++ b/mysql_5/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stretch-slim
+FROM debian:buster-slim
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN groupadd -r mysql && useradd -r -g mysql mysql
@@ -48,9 +48,9 @@ RUN set -ex; \
 	apt-key list > /dev/null
 
 ENV MYSQL_MAJOR 5.7
-ENV MYSQL_VERSION 5.7.29-1debian9
+ENV MYSQL_VERSION 5.7.29-1debian10
 
-RUN echo "deb http://repo.mysql.com/apt/debian/ stretch mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
+RUN echo "deb http://repo.mysql.com/apt/debian/ buster mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
 
 # 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/mysql_5/docker-entrypoint.sh b/mysql_5/docker-entrypoint.sh
index 6256a08..e7dd759 100755
--- a/mysql_5/docker-entrypoint.sh
+++ b/mysql_5/docker-entrypoint.sh
@@ -341,6 +341,10 @@ _main() {
 		# there's no database, so it needs to be initialized
 		if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
 			docker_verify_minimum_env
+
+			# check dir permissions to reduce likelihood of half-initialized database
+			ls /docker-entrypoint-initdb.d/ > /dev/null
+
 			docker_init_database_dir "$@"
 
 			mysql_note "Starting temporary server"
diff --git a/mysql_latest/Dockerfile b/mysql_latest/Dockerfile
index e135be8..f14fc3c 100644
--- a/mysql_latest/Dockerfile
+++ b/mysql_latest/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stretch-slim
+FROM debian:buster-slim
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN groupadd -r mysql && useradd -r -g mysql mysql
@@ -48,9 +48,9 @@ RUN set -ex; \
 	apt-key list > /dev/null
 
 ENV MYSQL_MAJOR 8.0
-ENV MYSQL_VERSION 8.0.19-1debian9
+ENV MYSQL_VERSION 8.0.19-1debian10
 
-RUN echo "deb http://repo.mysql.com/apt/debian/ stretch mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
+RUN echo "deb http://repo.mysql.com/apt/debian/ buster mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
 
 # 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/mysql_latest/docker-entrypoint.sh b/mysql_latest/docker-entrypoint.sh
index 6256a08..e7dd759 100755
--- a/mysql_latest/docker-entrypoint.sh
+++ b/mysql_latest/docker-entrypoint.sh
@@ -341,6 +341,10 @@ _main() {
 		# there's no database, so it needs to be initialized
 		if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
 			docker_verify_minimum_env
+
+			# check dir permissions to reduce likelihood of half-initialized database
+			ls /docker-entrypoint-initdb.d/ > /dev/null
+
 			docker_init_database_dir "$@"
 
 			mysql_note "Starting temporary server"

@tianon
Copy link
Member Author

tianon commented Mar 4, 2020

Build test of #7568; fb8fb26; amd64 (mysql):

$ bashbrew build mysql:8.0.19
Building bashbrew/cache:d5479ac38d55091934f761345768fc7ccaf412f3d4ddf8d79bd4dcfe8f2c690e (mysql:8.0.19)
Tagging mysql:8.0.19
Tagging mysql:8.0
Tagging mysql:8
Tagging mysql:latest

$ test/run.sh mysql:8.0.19
testing mysql:8.0.19
	'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 mysql:5.7.29
Building bashbrew/cache:76541fa6a9e9d126ed5de7c4aca069c88917be1110a137927e3375923493deaa (mysql:5.7.29)
Tagging mysql:5.7.29
Tagging mysql:5.7
Tagging mysql:5

$ test/run.sh mysql:5.7.29
testing mysql:5.7.29
	'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 mysql:5.6.47
Building bashbrew/cache:2555f5e8af75416d78bdd4c14c74c0bed971b52aaf6ac089a166b84e79cd29e4 (mysql:5.6.47)
Tagging mysql:5.6.47
Tagging mysql:5.6

$ test/run.sh mysql:5.6.47
testing mysql:5.6.47
	'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

@tianon tianon merged commit 2904a81 into docker-library:master Mar 4, 2020
@tianon tianon deleted the mysql branch March 4, 2020 16:25
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.

2 participants