diff --git a/Makefile b/Makefile index 37f951d481e..2cd6a5a3e8f 100644 --- a/Makefile +++ b/Makefile @@ -244,7 +244,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto # This rule builds the bootstrap images for all flavors. DOCKER_IMAGES_FOR_TEST = mariadb mariadb103 mysql56 mysql57 mysql80 percona percona57 percona80 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) -BOOTSTRAP_VERSION=4 +BOOTSTRAP_VERSION=4.1 ensure_bootstrap_version: find docker/ -type f -exec sed -i "s/^\(ARG bootstrap_version\)=.*/\1=${BOOTSTRAP_VERSION}/" {} \; sed -i 's/\(^.*flag.String(\"bootstrap-version\",\) *\"[^\"]\+\"/\1 \"${BOOTSTRAP_VERSION}\"/' test.go diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 869a316f262..6d3866213be 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -21,7 +21,7 @@ # TODO(mberlin): Remove the symlink and this note once # https://github.com/docker/hub-feedback/issues/292 is fixed. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" diff --git a/docker/base/Dockerfile.mariadb b/docker/base/Dockerfile.mariadb index 6eb4ff4baf0..74365536366 100644 --- a/docker/base/Dockerfile.mariadb +++ b/docker/base/Dockerfile.mariadb @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mariadb" FROM "${image}" diff --git a/docker/base/Dockerfile.mariadb103 b/docker/base/Dockerfile.mariadb103 index 42642e05c64..29cbc7e9eed 100644 --- a/docker/base/Dockerfile.mariadb103 +++ b/docker/base/Dockerfile.mariadb103 @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103" FROM "${image}" diff --git a/docker/base/Dockerfile.mysql56 b/docker/base/Dockerfile.mysql56 index 8866c98306c..63182230f15 100644 --- a/docker/base/Dockerfile.mysql56 +++ b/docker/base/Dockerfile.mysql56 @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql56" FROM "${image}" diff --git a/docker/base/Dockerfile.mysql80 b/docker/base/Dockerfile.mysql80 index 5ce9edfd52c..40ae8cd9200 100644 --- a/docker/base/Dockerfile.mysql80 +++ b/docker/base/Dockerfile.mysql80 @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" diff --git a/docker/base/Dockerfile.percona b/docker/base/Dockerfile.percona index 04d084cd5a7..559864d5c95 100644 --- a/docker/base/Dockerfile.percona +++ b/docker/base/Dockerfile.percona @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona" FROM "${image}" diff --git a/docker/base/Dockerfile.percona57 b/docker/base/Dockerfile.percona57 index 8c25c573275..4b88fe9f45d 100644 --- a/docker/base/Dockerfile.percona57 +++ b/docker/base/Dockerfile.percona57 @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" diff --git a/docker/base/Dockerfile.percona80 b/docker/base/Dockerfile.percona80 index 2091bdb38f6..f83a84e7a5a 100644 --- a/docker/base/Dockerfile.percona80 +++ b/docker/base/Dockerfile.percona80 @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index f59309213f2..9f2e48b4a0c 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -1,4 +1,4 @@ -FROM golang:1.17-buster +FROM golang:1.17.9-buster # Install Vitess build dependencies RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ diff --git a/docker/bootstrap/Dockerfile.mysql56 b/docker/bootstrap/Dockerfile.mysql56 index 1ce1229de37..c6af31839ac 100644 --- a/docker/bootstrap/Dockerfile.mysql56 +++ b/docker/bootstrap/Dockerfile.mysql56 @@ -3,15 +3,11 @@ ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" -# Install MySQL 5.6 -# -# Unfortunately we need to keep the 'stretch' repo from Oracle as there's no official support -# for MySQL 5.6 for Debian Buster: https://bugs.mysql.com/bug.php?id=101055 -# -# I think it's fine as MySQL 5.6 will be EOL pretty soon (February 5, 2021) -# -RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 8C718D3B5072E1F5 && break; done && \ - for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 467B942D3A79BD29 && break; done && \ +# Install MySQL 5.6. This version of MySQL is completely EOL by Oracle, and hence the upstream +# APT repositories are no longer signed. We need to use `--allow-insecure-repositories` when updating +# and `--allow-unauthenticated` for installing, otherwise APT will refuse to install the unsigned packages. +# TODO@vmg: remove the mysql56 image altogether +RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 467B942D3A79BD29 && break; done && \ add-apt-repository 'deb http://repo.mysql.com/apt/debian/ stretch mysql-5.6' && \ for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 && break; done && \ echo 'deb http://repo.percona.com/apt buster main' > /etc/apt/sources.list.d/percona.list && \ @@ -20,8 +16,8 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyser echo percona-server-server-5.6 percona-server-server/root_password password 'unused'; \ echo percona-server-server-5.6 percona-server-server/root_password_again password 'unused'; \ } | debconf-set-selections && \ - apt-get update -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 percona-xtrabackup-24 && \ + apt-get update -y --allow-insecure-repositories && \ + DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 percona-xtrabackup-24 && \ rm -rf /var/lib/apt/lists/* # Bootstrap Vitess diff --git a/docker/bootstrap/Dockerfile.mysql57 b/docker/bootstrap/Dockerfile.mysql57 index 0b8cf107aed..73413d534ae 100644 --- a/docker/bootstrap/Dockerfile.mysql57 +++ b/docker/bootstrap/Dockerfile.mysql57 @@ -5,7 +5,6 @@ FROM "${image}" # Install MySQL 5.7 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gnupg dirmngr ca-certificates && \ - for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 8C718D3B5072E1F5 && break; done && \ for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 467B942D3A79BD29 && break; done && \ add-apt-repository 'deb http://repo.mysql.com/apt/debian/ buster mysql-5.7' && \ for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 && break; done && \ diff --git a/docker/lite/Dockerfile.alpine b/docker/lite/Dockerfile.alpine index b8c06a8ab10..fb7317ae336 100644 --- a/docker/lite/Dockerfile.alpine +++ b/docker/lite/Dockerfile.alpine @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mariadb b/docker/lite/Dockerfile.mariadb index 48c600c2a5c..542b8dff765 100644 --- a/docker/lite/Dockerfile.mariadb +++ b/docker/lite/Dockerfile.mariadb @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mariadb" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mariadb103 b/docker/lite/Dockerfile.mariadb103 index d0e74194128..d1ba9062023 100644 --- a/docker/lite/Dockerfile.mariadb103 +++ b/docker/lite/Dockerfile.mariadb103 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mariadb103" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mysql56 b/docker/lite/Dockerfile.mysql56 index fb088729d3d..97b5f970dbb 100644 --- a/docker/lite/Dockerfile.mysql56 +++ b/docker/lite/Dockerfile.mysql56 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql56" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mysql57 b/docker/lite/Dockerfile.mysql57 index d98aef1104f..4fd524da344 100644 --- a/docker/lite/Dockerfile.mysql57 +++ b/docker/lite/Dockerfile.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.mysql80 index 031544a9fa5..1dc7266fb4f 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.percona b/docker/lite/Dockerfile.percona index f0cc14389c4..5c19e2147be 100644 --- a/docker/lite/Dockerfile.percona +++ b/docker/lite/Dockerfile.percona @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.percona57 b/docker/lite/Dockerfile.percona57 index 1c368e06a54..f68be57de91 100644 --- a/docker/lite/Dockerfile.percona57 +++ b/docker/lite/Dockerfile.percona57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index a9391e3cff9..922dfde8816 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.testing b/docker/lite/Dockerfile.testing index f92e3912291..be3cc01558e 100644 --- a/docker/lite/Dockerfile.testing +++ b/docker/lite/Dockerfile.testing @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.mysql57 b/docker/lite/Dockerfile.ubi7.mysql57 index 692c52ab6cf..8b4e7418f57 100644 --- a/docker/lite/Dockerfile.ubi7.mysql57 +++ b/docker/lite/Dockerfile.ubi7.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.mysql80 b/docker/lite/Dockerfile.ubi7.mysql80 index 9b831480db8..c3aa5a1898f 100644 --- a/docker/lite/Dockerfile.ubi7.mysql80 +++ b/docker/lite/Dockerfile.ubi7.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.percona57 b/docker/lite/Dockerfile.ubi7.percona57 index 796ea1d7700..defba2bf675 100644 --- a/docker/lite/Dockerfile.ubi7.percona57 +++ b/docker/lite/Dockerfile.ubi7.percona57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" AS builder diff --git a/docker/lite/Dockerfile.ubi7.percona80 b/docker/lite/Dockerfile.ubi7.percona80 index 842670685e3..1136f47e88e 100644 --- a/docker/lite/Dockerfile.ubi7.percona80 +++ b/docker/lite/Dockerfile.ubi7.percona80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" AS builder diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile index 95cf86bd698..eedeb6db392 100644 --- a/docker/local/Dockerfile +++ b/docker/local/Dockerfile @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" diff --git a/docker/vttestserver/Dockerfile.mysql57 b/docker/vttestserver/Dockerfile.mysql57 index bb70af05ca4..6db5520b0a6 100644 --- a/docker/vttestserver/Dockerfile.mysql57 +++ b/docker/vttestserver/Dockerfile.mysql57 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index 8c1e64203eb..37c195fab3b 100644 --- a/docker/vttestserver/Dockerfile.mysql80 +++ b/docker/vttestserver/Dockerfile.mysql80 @@ -17,7 +17,7 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder diff --git a/test/templates/dockerfile.tpl b/test/templates/dockerfile.tpl index 026fca24eca..1d37a1f40e2 100644 --- a/test/templates/dockerfile.tpl +++ b/test/templates/dockerfile.tpl @@ -1,4 +1,4 @@ -ARG bootstrap_version=4 +ARG bootstrap_version=4.1 ARG image="vitess/bootstrap:${bootstrap_version}-{{.Platform}}" FROM "${image}"