From 002ac544f49870ea4d6d9827b900f3d8f2381c0f Mon Sep 17 00:00:00 2001 From: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:21:01 -0600 Subject: [PATCH] Remove MySQL/Percona from the `vitess/lite` Docker image (#15605) Signed-off-by: Florent Poinsard --- .github/workflows/docker_build_lite.yml | 2 +- Makefile | 4 +- changelog/20.0/20.0.0/summary.md | 45 ++++++++ docker/base/Dockerfile | 2 +- docker/base/Dockerfile.mysql57 | 2 +- docker/base/Dockerfile.percona57 | 2 +- docker/base/Dockerfile.percona80 | 2 +- docker/bootstrap/CHANGELOG.md | 6 +- docker/bootstrap/Dockerfile.common | 6 + docker/bootstrap/Dockerfile.mysql57 | 6 +- docker/bootstrap/Dockerfile.mysql80 | 6 +- docker/bootstrap/Dockerfile.percona57 | 6 +- docker/bootstrap/Dockerfile.percona80 | 6 +- docker/lite/Dockerfile | 55 ++++++++- docker/lite/Dockerfile.percona80 | 57 --------- docker/lite/Dockerfile.testing | 9 +- .../{Dockerfile.mysql57 => Dockerfile.ubi7} | 22 ++-- docker/lite/Dockerfile.ubi7.mysql57 | 101 ---------------- docker/lite/Dockerfile.ubi7.mysql80 | 101 ---------------- docker/lite/Dockerfile.ubi7.percona57 | 91 --------------- docker/lite/Dockerfile.ubi7.percona80 | 95 --------------- .../{Dockerfile.mysql80 => Dockerfile.ubi8} | 25 ++-- ...erfile.percona57 => Dockerfile.ubi8.arm64} | 27 ++--- docker/lite/Dockerfile.ubi8.arm64.mysql80 | 108 ------------------ docker/lite/Dockerfile.ubi8.mysql80 | 106 ----------------- docker/local/Dockerfile | 4 +- docker/root/Dockerfile | 20 ---- .../{lite => utils}/install_dependencies.sh | 0 docker/vttestserver/Dockerfile.mysql57 | 4 +- docker/vttestserver/Dockerfile.mysql80 | 4 +- test.go | 2 +- test/templates/dockerfile.tpl | 2 +- 32 files changed, 174 insertions(+), 754 deletions(-) mode change 120000 => 100644 docker/lite/Dockerfile delete mode 100644 docker/lite/Dockerfile.percona80 rename docker/lite/{Dockerfile.mysql57 => Dockerfile.ubi7} (84%) delete mode 100644 docker/lite/Dockerfile.ubi7.mysql57 delete mode 100644 docker/lite/Dockerfile.ubi7.mysql80 delete mode 100644 docker/lite/Dockerfile.ubi7.percona57 delete mode 100644 docker/lite/Dockerfile.ubi7.percona80 rename docker/lite/{Dockerfile.mysql80 => Dockerfile.ubi8} (82%) rename docker/lite/{Dockerfile.percona57 => Dockerfile.ubi8.arm64} (80%) delete mode 100644 docker/lite/Dockerfile.ubi8.arm64.mysql80 delete mode 100644 docker/lite/Dockerfile.ubi8.mysql80 delete mode 100644 docker/root/Dockerfile rename docker/{lite => utils}/install_dependencies.sh (100%) diff --git a/.github/workflows/docker_build_lite.yml b/.github/workflows/docker_build_lite.yml index 80cc888239b..96db1bf1a41 100644 --- a/.github/workflows/docker_build_lite.yml +++ b/.github/workflows/docker_build_lite.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: true matrix: - branch: [ latest, mysql57, mysql80, percona57, percona80 ] + branch: [ latest ] steps: - name: Check out code diff --git a/Makefile b/Makefile index 6b14719ac10..5f5d7094270 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto # This rule builds the bootstrap images for all flavors. DOCKER_IMAGES_FOR_TEST = mysql57 mysql80 percona57 percona80 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) -BOOTSTRAP_VERSION=29 +BOOTSTRAP_VERSION=30 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 @@ -331,7 +331,7 @@ docker_base_all: docker_base $(DOCKER_BASE_TARGETS) docker_lite: ${call build_docker_image,docker/lite/Dockerfile,vitess/lite} -DOCKER_LITE_SUFFIX = mysql57 ubi7.mysql57 mysql80 ubi7.mysql80 percona57 ubi7.percona57 percona80 ubi7.percona80 testing ubi8.mysql80 ubi8.arm64.mysql80 +DOCKER_LITE_SUFFIX = testing ubi7 ubi8 ubi8.arm64 DOCKER_LITE_TARGETS = $(addprefix docker_lite_,$(DOCKER_LITE_SUFFIX)) $(DOCKER_LITE_TARGETS): docker_lite_%: ${call build_docker_image,docker/lite/Dockerfile.$*,vitess/lite:$*} diff --git a/changelog/20.0/20.0.0/summary.md b/changelog/20.0/20.0.0/summary.md index 4665069e1fe..d0021555c0b 100644 --- a/changelog/20.0/20.0.0/summary.md +++ b/changelog/20.0/20.0.0/summary.md @@ -3,6 +3,8 @@ ### Table of Contents - **[Major Changes](#major-changes)** + - **[Deletions](#deletions)** + - [MySQL binaries in the vitess/lite Docker images](#vitess-lite) - **[Breaking changes](#breaking-changes)** - [`shutdown_grace_period` Default Change](#shutdown-grace-period-default) - [New `unmanaged` Flag and `disable_active_reparents` deprecation](#unmanaged-flag) @@ -26,6 +28,49 @@ ## Major Changes +### Deletion + +#### MySQL binaries in the `vitess/lite` Docker images + +In `v19.0.0` we had deprecated the `mysqld` binary in the `vitess/lite` Docker image. +Making MySQL/Percona version specific image tags also deprecated. + +Starting in `v20.0.0` we no longer build the MySQL/Percona version specific image tags. +Moreover, the `mysqld` binary is no longer present on the `vitess/lite` image. + +Here are the images we will no longer build and push: + +| Image | Available | +|---------------------------------|-----------| +| `vitess/lite:v20.0.0` | YES | +| `vitess/lite:v20.0.0-mysql57` | NO | +| `vitess/lite:v20.0.0-mysql80` | NO | +| `vitess/lite:v20.0.0-percona57` | NO | +| `vitess/lite:v20.0.0-percona80` | NO | + + +If you have not done it yet, you can use an official MySQL Docker image for your `mysqld` container now such as: `mysql:8.0.30`. +Below is an example of a kubernetes yaml file before and after upgrading to an official MySQL image: + +```yaml +# before: + +# you are still on v19 and are looking to upgrade to v20 +# the image used here includes MySQL 8.0.30 and its binaries + + mysqld: + mysql80Compatible: vitess/lite:v19.0.0-mysql80 +``` +```yaml +# after: + +# if we still want to use MySQL 8.0.30, we now have to use the +# official MySQL image with the 8.0.30 tag as shown below + + mysqld: + mysql80Compatible: mysql:8.0.30 # or even mysql:8.0.34 for instance +``` + ### Breaking Changes #### `shutdown_grace_period` Default Change diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 58b257cae37..dd3a36955c7 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" diff --git a/docker/base/Dockerfile.mysql57 b/docker/base/Dockerfile.mysql57 index 68d1688b06b..bea82db9bdd 100644 --- a/docker/base/Dockerfile.mysql57 +++ b/docker/base/Dockerfile.mysql57 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" diff --git a/docker/base/Dockerfile.percona57 b/docker/base/Dockerfile.percona57 index 88d8572dc6e..6768f11a291 100644 --- a/docker/base/Dockerfile.percona57 +++ b/docker/base/Dockerfile.percona57 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-percona57" FROM "${image}" diff --git a/docker/base/Dockerfile.percona80 b/docker/base/Dockerfile.percona80 index 96cbd86af94..04cec8ae483 100644 --- a/docker/base/Dockerfile.percona80 +++ b/docker/base/Dockerfile.percona80 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-percona80" FROM "${image}" diff --git a/docker/bootstrap/CHANGELOG.md b/docker/bootstrap/CHANGELOG.md index 39d3627780b..bacddc7ecd8 100644 --- a/docker/bootstrap/CHANGELOG.md +++ b/docker/bootstrap/CHANGELOG.md @@ -112,4 +112,8 @@ List of changes between bootstrap image versions. ## [29] - 2024-03-05 ### Changes -- Update build to golang 1.22.1 \ No newline at end of file +- Update build to golang 1.22.1 + +## [30] - 2024-04-01 +### Changes +- Move the bootstrap phase to the common image so other Dockerfiles don't have to rely on the version based tags. \ No newline at end of file diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index e5674c281a6..2793ad94eee 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -46,5 +46,11 @@ VOLUME /vt/vtdataroot # Add compatibility to the previous layout for now RUN su vitess -c "mkdir -p /vt/src/vitess.io/vitess/bin && rm -rf /vt/bin && ln -s /vt/src/vitess.io/vitess/bin /vt/bin" +# Bootstrap Vitess +WORKDIR /vt/src/vitess.io/vitess + +USER vitess +RUN ./bootstrap.sh + # If the user doesn't specify a command, load a shell. CMD ["/bin/bash"] diff --git a/docker/bootstrap/Dockerfile.mysql57 b/docker/bootstrap/Dockerfile.mysql57 index 4d79be9d3ec..c5be81c1cdc 100644 --- a/docker/bootstrap/Dockerfile.mysql57 +++ b/docker/bootstrap/Dockerfile.mysql57 @@ -3,6 +3,8 @@ ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM --platform=linux/amd64 "${image}" +USER root + # 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 A8D3785C && break; done && \ @@ -18,8 +20,4 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 percona-xtrabackup-24 && \ rm -rf /var/lib/apt/lists/* -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/Dockerfile.mysql80 b/docker/bootstrap/Dockerfile.mysql80 index ff125eb7c83..b4fec6b7d11 100644 --- a/docker/bootstrap/Dockerfile.mysql80 +++ b/docker/bootstrap/Dockerfile.mysql80 @@ -3,6 +3,8 @@ ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM --platform=linux/amd64 "${image}" +USER root + # Install MySQL 8.0 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 A8D3785C && break; done && \ @@ -18,8 +20,4 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyser DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 libcurl4-openssl-dev percona-xtrabackup-80 && \ rm -rf /var/lib/apt/lists/* -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/Dockerfile.percona57 b/docker/bootstrap/Dockerfile.percona57 index febe09fd8bf..96a23da221a 100644 --- a/docker/bootstrap/Dockerfile.percona57 +++ b/docker/bootstrap/Dockerfile.percona57 @@ -3,6 +3,8 @@ ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM --platform=linux/amd64 "${image}" +USER root + # Install Percona 5.7 RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 && break; done && \ add-apt-repository 'deb http://repo.percona.com/apt bullseye main' && \ @@ -16,8 +18,4 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.c apt-get install -y --no-install-recommends libperconaserverclient20-dev percona-xtrabackup-24 && \ rm -rf /var/lib/apt/lists/* -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/Dockerfile.percona80 b/docker/bootstrap/Dockerfile.percona80 index f4d9f1c0458..147b988b002 100644 --- a/docker/bootstrap/Dockerfile.percona80 +++ b/docker/bootstrap/Dockerfile.percona80 @@ -3,6 +3,8 @@ ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM --platform=linux/amd64 "${image}" +USER root + # Install Percona 8.0 RUN 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/ps-80/apt bullseye main' > /etc/apt/sources.list.d/percona.list && \ @@ -31,8 +33,4 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.c && apt-get install -y --no-install-recommends percona-xtrabackup-80 \ && rm -rf /var/lib/apt/lists/* -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - USER vitess -RUN ./bootstrap.sh diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile deleted file mode 120000 index e058f627eca..00000000000 --- a/docker/lite/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.mysql80 \ No newline at end of file diff --git a/docker/lite/Dockerfile b/docker/lite/Dockerfile new file mode 100644 index 00000000000..ff65d858dad --- /dev/null +++ b/docker/lite/Dockerfile @@ -0,0 +1,54 @@ +# Copyright 2019 The Vitess Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: We have to build the Vitess binaries from scratch instead of sharing +# a base image because Docker Hub dropped the feature we relied upon to +# ensure images contain the right binaries. + +# Use a temporary layer for the build stage. +ARG bootstrap_version=30 +ARG image="vitess/bootstrap:${bootstrap_version}-common" + +FROM "${image}" AS builder + +# Allows docker builds to set the BUILD_NUMBER +ARG BUILD_NUMBER + +# Re-copy sources from working tree. +COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess + +# Build and install Vitess in a temporary output directory. +USER vitess + +RUN make install PREFIX=/vt/install + +# Start over and build the final image. +FROM debian:bullseye-slim + +# Set up Vitess user and directory tree. +RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt + +# Set up Vitess environment (just enough to run pre-built Go binaries) +ENV VTROOT /vt/src/vitess.io/vitess +ENV VTDATAROOT /vt/vtdataroot +ENV PATH $VTROOT/bin:$PATH + +# Copy artifacts from builder layer. +COPY --from=builder --chown=vitess:vitess /vt/install /vt +COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin + +# Create mount point for actual data (e.g. MySQL data dir) +VOLUME /vt/vtdataroot +USER vitess diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 deleted file mode 100644 index 9fc13c3d74f..00000000000 --- a/docker/lite/Dockerfile.percona80 +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-percona80" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM debian:bullseye-slim - -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh percona80 - -# Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess diff --git a/docker/lite/Dockerfile.testing b/docker/lite/Dockerfile.testing index 4090abe7af5..c6a34df2784 100644 --- a/docker/lite/Dockerfile.testing +++ b/docker/lite/Dockerfile.testing @@ -17,8 +17,8 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" +ARG bootstrap_version=30 +ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" AS builder @@ -30,15 +30,12 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess # Build and install Vitess in a temporary output directory. USER vitess + RUN make install-testing PREFIX=/vt/install # Start over and build the final image. FROM debian:bullseye-slim -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh mysql57 - # Set up Vitess user and directory tree. RUN groupadd -r vitess && useradd -r -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt diff --git a/docker/lite/Dockerfile.mysql57 b/docker/lite/Dockerfile.ubi7 similarity index 84% rename from docker/lite/Dockerfile.mysql57 rename to docker/lite/Dockerfile.ubi7 index f0d1f1c267c..52cebdc15b7 100644 --- a/docker/lite/Dockerfile.mysql57 +++ b/docker/lite/Dockerfile.ubi7 @@ -1,11 +1,11 @@ # Copyright 2019 The Vitess Authors. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" +ARG bootstrap_version=30 +ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" AS builder @@ -30,17 +30,14 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess # Build and install Vitess in a temporary output directory. USER vitess + RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM debian:bullseye-slim - -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh mysql57 +FROM registry.access.redhat.com/ubi7/ubi:latest # Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt # Set up Vitess environment (just enough to run pre-built Go binaries) @@ -52,6 +49,9 @@ ENV PATH $VTROOT/bin:$PATH COPY --from=builder --chown=vitess:vitess /vt/install /vt COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin +RUN mkdir -p /licenses +COPY LICENSE /licenses + # Create mount point for actual data (e.g. MySQL data dir) VOLUME /vt/vtdataroot USER vitess diff --git a/docker/lite/Dockerfile.ubi7.mysql57 b/docker/lite/Dockerfile.ubi7.mysql57 deleted file mode 100644 index 4602a4486bc..00000000000 --- a/docker/lite/Dockerfile.ubi7.mysql57 +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi7/ubi:latest - -# Install keys and dependencies -RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 A4A9406876FCBD3C456770C88C718D3B5072E1F5 ) \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 \ - && gpg --export --armor A4A9406876FCBD3C456770C88C718D3B5072E1F5 > ${GNUPGHOME}/RPM-GPG-KEY-MySQL \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 ${GNUPGHOME}/RPM-GPG-KEY-MySQL /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/mysqlrepo.rpm https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rm -f /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm -RUN echo H4sICH852V8CA2ZvbwC1jr0OgkAQhPt7CgrbY7W6xOQaDaEgRqKxMMTiOFYg/F2WI9G39xCttKGg2UxmJrNfokWqeryxVjUo99ja45kLj3s757IxGqiWhbVmC9CURB352rW63u8oh0mCAHdWY1uRLoDlJtcF6kpuRlnhU97LGt0CoNVgqhLINNxFcIoPPIxDHgVX/v3OsFVpjZlcM5ZoMZhMWex/ES9TMIPyM7UYKj4sqT+kwdufAToNLcP5AvRgmV7zAQAA | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c7base --enablerepo c7updates --enablerepo c7extras install libev gperftools-libs numactl-libs sysstat strace -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - jemalloc gperftools-libs procps-ng rsync wget openssl hostname curl tzdata make \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs --enablerepo mysql57-community --disablerepo mysql80-community \ - mysql-community-client mysql-community-server \ -# Have to use hacks to ignore conflicts on /etc/my.cnf install - && mkdir -p /tmp/1 \ - && yum install -y --setopt=alwaysprompt=no --downloadonly --downloaddir=/tmp/1 --enablerepo mysql57-community --disablerepo mysql80-community percona-xtrabackup-24 percona-toolkit \ - && rpm -Uvh --replacefiles /tmp/1/*rpm \ - && rm -rf /tmp/1 \ - && yum clean all \ - && yum clean all --enablerepo mysql57-community --disablerepo mysql80-community \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - MySQL Community Server 5.7" \ - io.k8s.display-name="Vitess Lite image - MySQL Community Server 5.7" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="6.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with MySQL Community Server 5.7" \ - description="Vitess base container image, containing Vitess components along with MySQL Community Server 5.7" \ - io.k8s.description="Vitess base container image, containing Vitess components along with MySQL Community Server 5.7" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/lite/Dockerfile.ubi7.mysql80 b/docker/lite/Dockerfile.ubi7.mysql80 deleted file mode 100644 index af3ed721763..00000000000 --- a/docker/lite/Dockerfile.ubi7.mysql80 +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi7/ubi:latest - -# Install keys and dependencies -RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 A4A9406876FCBD3C456770C88C718D3B5072E1F5 ) \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 \ - && gpg --export --armor A4A9406876FCBD3C456770C88C718D3B5072E1F5 > ${GNUPGHOME}/RPM-GPG-KEY-MySQL \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 ${GNUPGHOME}/RPM-GPG-KEY-MySQL /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/mysqlrepo.rpm https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rm -f /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm -RUN echo H4sICH852V8CA2ZvbwC1jr0OgkAQhPt7CgrbY7W6xOQaDaEgRqKxMMTiOFYg/F2WI9G39xCttKGg2UxmJrNfokWqeryxVjUo99ja45kLj3s757IxGqiWhbVmC9CURB352rW63u8oh0mCAHdWY1uRLoDlJtcF6kpuRlnhU97LGt0CoNVgqhLINNxFcIoPPIxDHgVX/v3OsFVpjZlcM5ZoMZhMWex/ES9TMIPyM7UYKj4sqT+kwdufAToNLcP5AvRgmV7zAQAA | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c7base --enablerepo c7updates --enablerepo c7extras install libev gperftools-libs numactl-libs sysstat strace -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - jemalloc gperftools-libs procps-ng rsync wget openssl hostname curl tzdata make \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs --enablerepo mysql80-community --disablerepo mysql57-community \ - mysql-community-client mysql-community-server \ -# Have to use hacks to ignore conflicts on /etc/my.cnf install - && mkdir -p /tmp/1 \ - && yum install -y --setopt=alwaysprompt=no --downloadonly --downloaddir=/tmp/1 --enablerepo mysql80-community --disablerepo mysql57-community percona-xtrabackup-80 percona-toolkit \ - && rpm -Uvh --replacefiles /tmp/1/*rpm \ - && rm -rf /tmp/1 \ - && yum clean all \ - && yum clean all --enablerepo mysql80-community --disablerepo mysql57-community \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - MySQL Community Server 8.0" \ - io.k8s.display-name="Vitess Lite image - MySQL Community Server 8.0" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="6.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - io.k8s.description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/lite/Dockerfile.ubi7.percona57 b/docker/lite/Dockerfile.ubi7.percona57 deleted file mode 100644 index 443bb38edad..00000000000 --- a/docker/lite/Dockerfile.ubi7.percona57 +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-percona57" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi7/ubi:latest - -# Install keys and dependencies -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 ) \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/perconarepo.rpm \ - && rm -f /tmp/perconarepo.rpm -RUN echo H4sICH852V8CA2ZvbwC1jr0OgkAQhPt7CgrbY7W6xOQaDaEgRqKxMMTiOFYg/F2WI9G39xCttKGg2UxmJrNfokWqeryxVjUo99ja45kLj3s757IxGqiWhbVmC9CURB352rW63u8oh0mCAHdWY1uRLoDlJtcF6kpuRlnhU97LGt0CoNVgqhLINNxFcIoPPIxDHgVX/v3OsFVpjZlcM5ZoMZhMWex/ES9TMIPyM7UYKj4sqT+kwdufAToNLcP5AvRgmV7zAQAA | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c7base --enablerepo c7updates --enablerepo c7extras install libev gperftools-libs numactl-libs sysstat strace -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - jemalloc gperftools-libs procps-ng rsync wget openssl hostname curl tzdata make \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs Percona-Server-server-57 percona-xtrabackup-24 percona-toolkit \ - && yum clean all \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - Percona Server 5.7" \ - io.k8s.display-name="Vitess Lite image - Percona Server 5.7" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="6.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with Percona Server 5.7" \ - description="Vitess base container image, containing Vitess components along with Percona Server 5.7" \ - io.k8s.description="Vitess base container image, containing Vitess components along with Percona Server 5.7" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/lite/Dockerfile.ubi7.percona80 b/docker/lite/Dockerfile.ubi7.percona80 deleted file mode 100644 index 91cc8362d87..00000000000 --- a/docker/lite/Dockerfile.ubi7.percona80 +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-percona80" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi7/ubi:latest - -# Install keys and dependencies -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 ) \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/perconarepo.rpm \ - && rm -f /tmp/perconarepo.rpm -RUN echo H4sICH852V8CA2ZvbwC1jr0OgkAQhPt7CgrbY7W6xOQaDaEgRqKxMMTiOFYg/F2WI9G39xCttKGg2UxmJrNfokWqeryxVjUo99ja45kLj3s757IxGqiWhbVmC9CURB352rW63u8oh0mCAHdWY1uRLoDlJtcF6kpuRlnhU97LGt0CoNVgqhLINNxFcIoPPIxDHgVX/v3OsFVpjZlcM5ZoMZhMWex/ES9TMIPyM7UYKj4sqT+kwdufAToNLcP5AvRgmV7zAQAA | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c7base --enablerepo c7updates --enablerepo c7extras install libev gperftools-libs numactl-libs sysstat strace -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - jemalloc gperftools-libs procps-ng rsync wget openssl hostname curl tzdata make \ - && percona-release setup ps80 \ -# Without this pause, the subsequent yum install fails downloads -# regularly - && sleep 5 \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs percona-server-server percona-xtrabackup-80 percona-toolkit \ - && yum clean all \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - Percona Server 8.0" \ - io.k8s.display-name="Vitess Lite image - Percona Server 8.0" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="6.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with Percona Server 8.0" \ - description="Vitess base container image, containing Vitess components along with Percona Server 8.0" \ - io.k8s.description="Vitess base container image, containing Vitess components along with Percona Server 8.0" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.ubi8 similarity index 82% rename from docker/lite/Dockerfile.mysql80 rename to docker/lite/Dockerfile.ubi8 index 6dcbe64cb6f..36ef69e5867 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.ubi8 @@ -1,11 +1,11 @@ -# Copyright 2019 The Vitess Authors. -# +# Copyright 2022 The Vitess Authors. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" +ARG bootstrap_version=30 +ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" AS builder @@ -30,17 +30,14 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess # Build and install Vitess in a temporary output directory. USER vitess + RUN make install PREFIX=/vt/install # Start over and build the final image. -FROM debian:bullseye-slim - -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh mysql80 +FROM registry.access.redhat.com/ubi8/ubi:latest # Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt # Set up Vitess environment (just enough to run pre-built Go binaries) @@ -52,6 +49,10 @@ ENV PATH $VTROOT/bin:$PATH COPY --from=builder --chown=vitess:vitess /vt/install /vt COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin +RUN mkdir -p /licenses +COPY LICENSE /licenses + # Create mount point for actual data (e.g. MySQL data dir) VOLUME /vt/vtdataroot USER vitess + diff --git a/docker/lite/Dockerfile.percona57 b/docker/lite/Dockerfile.ubi8.arm64 similarity index 80% rename from docker/lite/Dockerfile.percona57 rename to docker/lite/Dockerfile.ubi8.arm64 index fe1eaae773a..a5efb9daa8f 100644 --- a/docker/lite/Dockerfile.percona57 +++ b/docker/lite/Dockerfile.ubi8.arm64 @@ -1,11 +1,11 @@ -# Copyright 2019 The Vitess Authors. -# +# Copyright 2022 The Vitess Authors. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,8 +17,8 @@ # ensure images contain the right binaries. # Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-percona57" +ARG bootstrap_version=30 +ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" AS builder @@ -30,17 +30,14 @@ COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess # Build and install Vitess in a temporary output directory. USER vitess -RUN make install PREFIX=/vt/install -# Start over and build the final image. -FROM debian:bullseye-slim +RUN make cross-install PREFIX=/vt/install GOOS=linux GOARCH=arm64 -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh percona57 +# Start over and build the final image. +FROM registry.access.redhat.com/ubi8/ubi:latest # Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess +RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt # Set up Vitess environment (just enough to run pre-built Go binaries) @@ -52,6 +49,10 @@ ENV PATH $VTROOT/bin:$PATH COPY --from=builder --chown=vitess:vitess /vt/install /vt COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin +RUN mkdir -p /licenses +COPY LICENSE /licenses + # Create mount point for actual data (e.g. MySQL data dir) VOLUME /vt/vtdataroot USER vitess + diff --git a/docker/lite/Dockerfile.ubi8.arm64.mysql80 b/docker/lite/Dockerfile.ubi8.arm64.mysql80 deleted file mode 100644 index 14d78c8f811..00000000000 --- a/docker/lite/Dockerfile.ubi8.arm64.mysql80 +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2022 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make cross-install PREFIX=/vt/install GOOS=linux GOARCH=arm64 - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi8/ubi:latest - -# Install keys and dependencies -RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 99DB70FAE1D7CE227FB6488205B555B38483C65D A8D3785C A4A9406876FCBD3C456770C88C718D3B5072E1F5 94E279EB8D8F25B21810ADF121EA45AB2F86D6A1 ) \ - # No xtrabackup packages for aarch64 yet, but still keeping this here - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-8 \ - && gpg --export --armor 94E279EB8D8F25B21810ADF121EA45AB2F86D6A1 > ${GNUPGHOME}/RPM-GPG-KEY-EPEL-8 \ - && gpg --export --armor A8D3785C > ${GNUPGHOME}/RPM-GPG-KEY-MySQL.1 \ - && gpg --export --armor A4A9406876FCBD3C456770C88C718D3B5072E1F5 > ${GNUPGHOME}/RPM-GPG-KEY-MySQL.2 \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-8 ${GNUPGHOME}/RPM-GPG-KEY-MySQL.1 ${GNUPGHOME}/RPM-GPG-KEY-MySQL.2 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/mysqlrepo.rpm https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rm -f /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm -RUN echo H4sICIDAHmICA2ZvbwDVkDFLxEAQhfv9FVfY7o4RhCBsoXJcIXKHwUIOi7m5MVk2yS6zG0//vYlRULTU4rrHvOHN+2ZL5Q4TP6oeO7bX3Od1pcuFXlyNUzVZg7S2yTmmCwDsgzjuDSUyB5SDI2+QzOChcyJBEnwkPOPQZijNuTkrigKmsHUFJ1MeCjUQEqg61tQweVtM0vOrfXItj1eAM0H0DiR2erTgbnOrV5uVvlk+6M+Kinvctby3p0ptqRziHjOnnxz3s/FnKJcxVlkYu/+k4Zcs+AvM8n3+jWW8MBc2NO6FZILUMEsoYQ76UvWI/vAGB/SOZZsCAAA= | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c8base --enablerepo c8updates --enablerepo c8extras libev numactl-libs sysstat strace \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs https://dl.fedoraproject.org/pub/epel/8/Everything/aarch64/Packages/g/gperftools-libs-2.7-9.el8.aarch64.rpm https://dl.fedoraproject.org/pub/epel/8/Everything/aarch64/Packages/j/jemalloc-5.2.1-2.el8.aarch64.rpm https://dl.fedoraproject.org/pub/epel/8/Everything/aarch64/Packages/l/libunwind-1.3.1-3.el8.aarch64.rpm -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - procps-ng rsync wget openssl hostname curl tzdata make \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs --enablerepo mysql80-community \ - mysql-community-client mysql-community-server \ -# Have to use hacks to ignore conflicts on /etc/my.cnf install - && mkdir -p /tmp/1 \ -# Enable xtrabackup and percona toolkit repo using the new percona-release tool, commented out for now (no aarch64 packages) - #&& /usr/bin/percona-release enable-only pxb-80 \ - #&& /usr/bin/percona-release enable pt \ - #&& yum install -y --setopt=alwaysprompt=no --downloadonly --downloaddir=/tmp/1 --enablerepo mysql80-community percona-xtrabackup-80 percona-toolkit \ - #&& rpm -Uvh --replacefiles /tmp/1/*rpm \ - && rm -rf /tmp/1 \ - && yum clean all \ - && yum clean all --enablerepo mysql80-community \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - MySQL Community Server 8.0" \ - io.k8s.display-name="Vitess Lite image - MySQL Community Server 8.0" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="13.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - io.k8s.description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/lite/Dockerfile.ubi8.mysql80 b/docker/lite/Dockerfile.ubi8.mysql80 deleted file mode 100644 index 1a03b30858f..00000000000 --- a/docker/lite/Dockerfile.ubi8.mysql80 +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2022 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=29 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM registry.access.redhat.com/ubi8/ubi:latest - -# Install keys and dependencies -RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 -RUN mkdir /tmp/gpg && chmod 700 /tmp/gpg && export GNUPGHOME=/tmp/gpg \ - && yum install -y --setopt=alwaysprompt=no gnupg \ - && ( gpg --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 4D1BB29D63D98E422B2113B19334A25F8507EFA5 99DB70FAE1D7CE227FB6488205B555B38483C65D A8D3785C A4A9406876FCBD3C456770C88C718D3B5072E1F5 94E279EB8D8F25B21810ADF121EA45AB2F86D6A1 ) \ - && gpg --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 \ - && gpg --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 \ - && gpg --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-CentOS-8 \ - && gpg --export --armor 94E279EB8D8F25B21810ADF121EA45AB2F86D6A1 > ${GNUPGHOME}/RPM-GPG-KEY-EPEL-8 \ - && gpg --export --armor A8D3785C > ${GNUPGHOME}/RPM-GPG-KEY-MySQL.1 \ - && gpg --export --armor A4A9406876FCBD3C456770C88C718D3B5072E1F5 > ${GNUPGHOME}/RPM-GPG-KEY-MySQL.2 \ - && rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona.1 ${GNUPGHOME}/RPM-GPG-KEY-Percona.2 ${GNUPGHOME}/RPM-GPG-KEY-CentOS-8 ${GNUPGHOME}/RPM-GPG-KEY-MySQL.1 ${GNUPGHOME}/RPM-GPG-KEY-MySQL.2 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ${GNUPGHOME}/RPM-GPG-KEY-EPEL-8 \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/mysqlrepo.rpm https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm \ - && curl -L --retry-delay 10 --retry 3 -o /tmp/perconarepo.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm \ - && rpmkeys --checksig /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rpm -Uvh /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm \ - && rm -f /tmp/mysqlrepo.rpm /tmp/perconarepo.rpm -RUN echo H4sICIDAHmICA2ZvbwDVkDFLxEAQhfv9FVfY7o4RhCBsoXJcIXKHwUIOi7m5MVk2yS6zG0//vYlRULTU4rrHvOHN+2ZL5Q4TP6oeO7bX3Od1pcuFXlyNUzVZg7S2yTmmCwDsgzjuDSUyB5SDI2+QzOChcyJBEnwkPOPQZijNuTkrigKmsHUFJ1MeCjUQEqg61tQweVtM0vOrfXItj1eAM0H0DiR2erTgbnOrV5uVvlk+6M+Kinvctby3p0ptqRziHjOnnxz3s/FnKJcxVlkYu/+k4Zcs+AvM8n3+jWW8MBc2NO6FZILUMEsoYQ76UvWI/vAGB/SOZZsCAAA= | base64 -d | gzip -dc > /etc/yum.repos.d/CentOS-Base.repo \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs --enablerepo c8base --enablerepo c8updates --enablerepo c8extras libev numactl-libs sysstat strace \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/g/gperftools-libs-2.7-9.el8.x86_64.rpm https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/j/jemalloc-5.2.1-2.el8.x86_64.rpm https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/l/libunwind-1.3.1-3.el8.x86_64.rpm -RUN yum update -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs \ - && yum install -y --setopt=alwaysprompt=no --setopt=tsflags=nodocs bzip2 ca-certificates gnupg libaio libcurl \ - procps-ng rsync wget openssl hostname curl tzdata make \ -# Can't use alwaysprompt=no here, since we need to pick up deps -# No way to separate key imports and accept deps separately in yum/dnf - && yum install -y --setopt=tsflags=nodocs --enablerepo mysql80-community \ - mysql-community-client mysql-community-server \ -# Have to use hacks to ignore conflicts on /etc/my.cnf install - && mkdir -p /tmp/1 \ - && /usr/bin/percona-release enable-only pxb-80 \ - && /usr/bin/percona-release enable pt \ - && yum install -y --setopt=alwaysprompt=no --downloadonly --downloaddir=/tmp/1 --enablerepo mysql80-community percona-xtrabackup-80 percona-toolkit \ - && rpm -Uvh --replacefiles /tmp/1/*rpm \ - && rm -rf /tmp/1 \ - && yum clean all \ - && yum clean all --enablerepo mysql80-community \ - && rm -rf /etc/my.cnf /var/lib/mysql /tmp/gpg /sbin/mysqld-debug - -# Set up Vitess user and directory tree. -RUN groupadd -g 1001 -r vitess && useradd -r -u 1001 -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin - -RUN mkdir -p /licenses -COPY LICENSE /licenses - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess - -LABEL name="Vitess Lite image - MySQL Community Server 8.0" \ - io.k8s.display-name="Vitess Lite image - MySQL Community Server 8.0" \ - maintainer="cncf-vitess-maintainers@lists.cncf.io" \ - vendor="CNCF" \ - version="13.0.0" \ - release="1" \ - summary="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - io.k8s.description="Vitess base container image, containing Vitess components along with MySQL Community Server 8.0" \ - distribution-scope="public" \ - url="https://vitess.io" diff --git a/docker/local/Dockerfile b/docker/local/Dockerfile index 4dabba76e0a..6f5248350e5 100644 --- a/docker/local/Dockerfile +++ b/docker/local/Dockerfile @@ -1,4 +1,4 @@ -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-common" FROM "${image}" @@ -7,7 +7,7 @@ RUN apt-get update RUN apt-get install -y sudo curl vim jq # Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh +COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh RUN /vt/dist/install_dependencies.sh mysql57 COPY docker/local/install_local_dependencies.sh /vt/dist/install_local_dependencies.sh diff --git a/docker/root/Dockerfile b/docker/root/Dockerfile deleted file mode 100644 index 37fc3d24a6c..00000000000 --- a/docker/root/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This is an image that just changes the default user to root. -# It's useful for cases when the 'docker run --user' flag can't be used, -# for example when running containers through a scheduler like Kubernetes. -FROM vitess/base - -USER root diff --git a/docker/lite/install_dependencies.sh b/docker/utils/install_dependencies.sh similarity index 100% rename from docker/lite/install_dependencies.sh rename to docker/utils/install_dependencies.sh diff --git a/docker/vttestserver/Dockerfile.mysql57 b/docker/vttestserver/Dockerfile.mysql57 index 19f9b6d4592..34d2120c795 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=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-mysql57" FROM "${image}" AS builder @@ -36,7 +36,7 @@ RUN make install-testing PREFIX=/vt/install FROM debian:bullseye-slim # Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh +COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh RUN /vt/dist/install_dependencies.sh mysql57 # Set up Vitess user and directory tree. diff --git a/docker/vttestserver/Dockerfile.mysql80 b/docker/vttestserver/Dockerfile.mysql80 index 74f304573d2..865cfbe1289 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=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-mysql80" FROM "${image}" AS builder @@ -36,7 +36,7 @@ RUN make install-testing PREFIX=/vt/install FROM debian:bullseye-slim # Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh +COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh RUN /vt/dist/install_dependencies.sh mysql80 # Set up Vitess user and directory tree. diff --git a/test.go b/test.go index d87fd8f810a..d51848d8c3a 100755 --- a/test.go +++ b/test.go @@ -77,7 +77,7 @@ For example: // Flags var ( flavor = flag.String("flavor", "mysql57", "comma-separated bootstrap flavor(s) to run against (when using Docker mode). Available flavors: all,"+flavors) - bootstrapVersion = flag.String("bootstrap-version", "29", "the version identifier to use for the docker images") + bootstrapVersion = flag.String("bootstrap-version", "30", "the version identifier to use for the docker images") runCount = flag.Int("runs", 1, "run each test this many times") retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests") logPass = flag.Bool("log-pass", false, "log test output even if it passes") diff --git a/test/templates/dockerfile.tpl b/test/templates/dockerfile.tpl index 131ce1e8a13..1a08ce8162d 100644 --- a/test/templates/dockerfile.tpl +++ b/test/templates/dockerfile.tpl @@ -1,4 +1,4 @@ -ARG bootstrap_version=29 +ARG bootstrap_version=30 ARG image="vitess/bootstrap:${bootstrap_version}-{{.Platform}}" FROM "${image}"