From 3db70b6b73fe211f95d1b547cbc6b7eb8544dd48 Mon Sep 17 00:00:00 2001 From: Sam Wronski Date: Tue, 2 Jul 2024 13:56:33 -0700 Subject: [PATCH] Add `vtctldclient` container image (#16318) Signed-off-by: Sam Wronski Signed-off-by: Sam Wronski Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> --- .github/workflows/docker_build_images.yml | 2 +- docker/binaries/vtctldclient/Dockerfile | 35 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 docker/binaries/vtctldclient/Dockerfile diff --git a/.github/workflows/docker_build_images.yml b/.github/workflows/docker_build_images.yml index 59885351808..a923b7f57c3 100644 --- a/.github/workflows/docker_build_images.yml +++ b/.github/workflows/docker_build_images.yml @@ -85,7 +85,7 @@ jobs: fail-fast: true matrix: debian: [ bullseye, bookworm ] - component: [ vtadmin, vtorc, vtgate, vttablet, mysqlctld, mysqlctl, vtctl, vtctlclient, vtctld, logrotate, logtail, vtbackup, vtexplain ] + component: [ vtadmin, vtorc, vtgate, vttablet, mysqlctld, mysqlctl, vtctl, vtctlclient, vtctld, vtctldclient, logrotate, logtail, vtbackup, vtexplain ] steps: - name: Check out code diff --git a/docker/binaries/vtctldclient/Dockerfile b/docker/binaries/vtctldclient/Dockerfile new file mode 100644 index 00000000000..4dc8678827e --- /dev/null +++ b/docker/binaries/vtctldclient/Dockerfile @@ -0,0 +1,35 @@ +# Copyright 2024 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. + +ARG VT_BASE_VER=latest +ARG DEBIAN_VER=stable-slim + +FROM vitess/lite:${VT_BASE_VER} AS lite + +FROM debian:${DEBIAN_VER} + +RUN apt-get update && \ + apt-get upgrade -qq && \ + apt-get install jq curl -qq --no-install-recommends && \ + apt-get autoremove && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=lite /vt/bin/vtctldclient /usr/bin/ + +# add vitess user/group and add permissions +RUN groupadd -r --gid 2000 vitess && \ + useradd -r -g vitess --uid 1000 vitess + +CMD ["/usr/bin/vtctldclient"]