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

chore(dockerhub): update AWS/GCP/Azure clients in support Docker images #6141

Merged
merged 12 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions docs/reference/dockerhub-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,42 @@ title: Garden Containers on Docker Hub

# Garden containers on Docker Hub

We publish a number of containers to our official Docker Hub account ([hub.docker.com/u/gardendev](https://hub.docker.com/u/gardendev)).
We publish a number of containers to our official Docker Hub
account ([hub.docker.com/u/gardendev](https://hub.docker.com/u/gardendev)).

## Garden Containers and bundled tools

For your convenience, we build and publish Docker containers that contain the Garden CLI as well as a number of Cloud Provider tools with every Garden release (and prerelease).
For your convenience, we build and publish Docker containers that contain the Garden CLI as well as a number of Cloud
Provider tools with every Garden release (and prerelease).

| Container | Contents |
|-----------------------------------|------------------------------------------------------------------|
| [`gardendev/garden`](https://hub.docker.com/r/gardendev/garden) | Contains only Garden CLI |
| [`gardendev/garden-aws`](https://hub.docker.com/r/gardendev/garden-aws) | Contains the Garden CLI, and the AWS CLI v2 |
| [`gardendev/garden-azure`](https://hub.docker.com/r/gardendev/garden-azure) | Contains the Garden CLI, and the Azure CLI |
| [`gardendev/garden-gcloud`](https://hub.docker.com/r/gardendev/garden-gcloud) | Contains the Garden CLI, and the Google Cloud CLI |
| [`gardendev/garden-aws-gcloud`](https://hub.docker.com/r/gardendev/garden-aws-gcloud) | Contains the Garden CLI, the Google Cloud CLI and the AWS CLI v2 |
| Container | Contents |
|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
| [`gardendev/garden`](https://hub.docker.com/r/gardendev/garden) | Contains only Garden CLI |
| [`gardendev/garden-aws`](https://hub.docker.com/r/gardendev/garden-aws) | Contains the Garden CLI, and the AWS CLI v2 |
| [`gardendev/garden-azure`](https://hub.docker.com/r/gardendev/garden-azure) | Contains the Garden CLI, and the Azure CLI |
| [`gardendev/garden-gcloud`](https://hub.docker.com/r/gardendev/garden-gcloud) | Contains the Garden CLI, and the Google Cloud CLI |
| [`gardendev/garden-aws-gcloud`](https://hub.docker.com/r/gardendev/garden-aws-gcloud) | Contains the Garden CLI, the Google Cloud CLI and the AWS CLI v2 |
| [`gardendev/garden-aws-gcloud-azure`](https://hub.docker.com/r/gardendev/garden-aws-gcloud-azure) | Contains the Garden CLI, the Google Cloud CLI, the AWS CLI v2, and the Azure CLI |

### Tags

| Tag name | Meaning |
|-----------------------------------|------------------------------------------------------------------|
| `latest` | Latest stable release of Garden CLI 0.13 (Codename Bonsai), the container is based on Alpine Linux.
| `bonsai-*` or `0.13-*` | Garden CLI version is 0.13 (Codename Bonsai). If the tag name does not contain edge, this is the latest stable release. |
| `acorn-*` or `0.12-*` | Garden CLI version is 0.12 (Codename Acorn). If the tag name does not contain `edge`, this is the latest stable release. |
| `x.y.z-n-*`, e.g. `0.13.0-0` | Garden CLI prerelease (Full semver version with prerelease modifier) |
| `x.y.z-*`, e.g. `0.13.0` | Garden CLI stable release (Semver version without prerelease) |
| `*-edge-*` | Edge tags contain the latest, potentially still unreleased changes to the Garden CLI in our development branches. |
| `*-alpine` or `*-alpine-*` | The container is based on Alpine Linux. |
| `*-buster` or `*-buster-*` | The container is based on Debian Linux (Buster version). |
| `*-rootless` | The default user of the container is `gardenuser`. The default user for all other containers is `root`. |
| Tag name | Meaning |
|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `latest` | Latest stable release of Garden CLI 0.13 (Codename Bonsai), the container is based on Alpine Linux. |
| `bonsai-*` or `0.13-*` | Garden CLI version is 0.13 (Codename Bonsai). If the tag name does not contain edge, this is the latest stable release. |
| `acorn-*` or `0.12-*` | Garden CLI version is 0.12 (Codename Acorn). If the tag name does not contain `edge`, this is the latest stable release. |
| `x.y.z-n-*`, e.g. `0.13.0-0` | Garden CLI prerelease (Full semver version with prerelease modifier) |
| `x.y.z-*`, e.g. `0.13.0` | Garden CLI stable release (Semver version without prerelease) |
| `*-edge-*` | Edge tags contain the latest, potentially still unreleased changes to the Garden CLI in our development branches. |
| `*-alpine` or `*-alpine-*` | The container is based on Alpine Linux. |
| `*-buster` or `*-buster-*` | [DEPRECATED] The container is based on Debian Linux (Buster version). Since Garden `0.13.32`, Buster is no longer supported and maintained. |
| `*-bookwarm` or `*-bookwarm-*` | The container is based on Debian Linux (Bookwarm version). Debian Bookworm has been supported since Garden `0.13.32`. |
| `*-rootless` | The default user of the container is `gardenuser`. The default user for all other containers is `root`. |

Examples:

- `0.12-edge-alpine`: Latest development build of Garden Acorn (0.12), based on Alpine Linux.
- `bonsai-alpine`: Latest stable release of Bonsai (0.13), based on Alpine Linux.
- `0.13.0-alpine-rootless`: Stable release `0.13.0`, based on Alpine Linux, default user of the container is `gardenuser`.
- `0.13.0-alpine-rootless`: Stable release `0.13.0`, based on Alpine Linux, default user of the container
is `gardenuser`.
- `0.13.0-0-alpine`: Pre-release `0.13.0-0`, based on Alpine Linux.
12 changes: 6 additions & 6 deletions support/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ RUN GARDEN_DISABLE_ANALYTICS=true GARDEN_DISABLE_VERSION_CHECK=true garden util

WORKDIR /project

FROM python:3.11-alpine@sha256:e5d592c422d6e527cb946ae6abb1886c511a5e163d3543865f5a5b9b61c01584 AS aws-builder
# Apline-3.20 seems to have some issues, see https://github.com/aws/aws-cli/issues/8698#issuecomment-2135662844
FROM python:3.11.9-alpine3.19@sha256:0b5ed25d3cc27cd35c7b0352bac8ef2ebc8dd3da72a0c03caaf4eb15d9ec827a AS aws-builder

ENV AWSCLI_VERSION=2.13.15
ENV AWSCLI_SHA256="ac63e8f42c7f8775edccdc004921420159420de9185cf011952dba8fda5895ff"
ENV AWSCLI_VERSION=2.16.0
ENV AWSCLI_SHA256="f6e15071a4327e57f0aa2b8f52a35b1378528b72cb68a586302ae7ae97087d05"

RUN apk add --no-cache \
wget \
Expand Down Expand Up @@ -113,10 +114,10 @@ RUN rm -rf $(find /google-cloud-sdk/ -regex ".*/__pycache__") && rm -rf /google-
FROM garden-base-root as garden-azure-base

WORKDIR /
ENV AZURE_CLI_VERSION=2.53.0
ENV AZURE_CLI_VERSION=2.61.0

RUN wget -O requirements.txt https://raw.githubusercontent.com/Azure/azure-cli/azure-cli-$AZURE_CLI_VERSION/src/azure-cli/requirements.py3.Linux.txt && \
echo "833a12c837df6b9d8b27abf908073eb2da971c8506d2b112946be4a36e1db7af requirements.txt" | sha256sum -c
echo "8ebbef38b1278448666246483721be61320e244ddfc2edb999b475364591f2eb requirements.txt" | sha256sum -c
RUN wget -O trim_sdk.py https://raw.githubusercontent.com/Azure/azure-cli/azure-cli-$AZURE_CLI_VERSION/scripts/trim_sdk.py && \
echo "2e6292f5285b4fcedbe8efd77309fade550667d1c502a6ffa078f1aa97942c64 trim_sdk.py" | sha256sum -c

Expand Down Expand Up @@ -175,7 +176,6 @@ ENV CLOUDSDK_PYTHON=python3
COPY --chown=$USER:root --from=gcloud-base /google-cloud-sdk /google-cloud-sdk
ENV PATH /google-cloud-sdk/bin:$PATH


#
# garden-aws-gloud-azure
#
Expand Down
23 changes: 11 additions & 12 deletions support/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ARG VARIANT=root

# NOTE: This is not the node version Garden itself will run in. Garden binaries have node "built in" and the version installed on the system does not matter.
# The main reason we base these images off of the Node image is for Azure DevOps Support.
FROM node:20.13.1-buster-slim@sha256:7ab273816c6bc500ddba1400d825708a5a5ed963cdc17c32d3fce70ac9a0f477 as garden-buster-base-root
FROM node:22.2.0-bookworm-slim@sha256:840079c08ec485123cf7ea506a13afea630db25606f71e6140cf8dbdf9bba552 as garden-bookworm-base-root
vvagaytsev marked this conversation as resolved.
Show resolved Hide resolved

FROM garden-buster-base-root as garden-base-root
FROM garden-bookworm-base-root as garden-base-root
# system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -49,7 +49,6 @@ FROM garden-base-root as garden-base-rootless
ENV USER=gardenuser
ENV HOME=/home/gardenuser
RUN useradd -ms /bin/bash $USER

USER $USER

FROM garden-base-$VARIANT as garden-base
Expand All @@ -69,8 +68,8 @@ WORKDIR /project
# garden-aws-base
#
FROM garden-base-root as garden-aws-base
ENV AWSCLI_VERSION=2.13.15
ENV AWSCLI_SHA256="45d2e0f304eb0f57e6b58ffc0664879c0bc1cf8365fd2f64bcb5f3bbf2e9434f"
ENV AWSCLI_VERSION=2.16.0
ENV AWSCLI_SHA256="e44efc8de54156d6d8c1d158c1976992f4045b85e550668ce4c6daf5d8777e2d"

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWSCLI_VERSION}.zip" -o "awscliv2.zip"
RUN echo "${AWSCLI_SHA256} awscliv2.zip" | sha256sum -c
Expand All @@ -81,8 +80,8 @@ RUN ./aws/install
# garden-gcloud-base
#
FROM garden-base as garden-gcloud-base
ENV GCLOUD_VERSION=444.0.0
ENV GCLOUD_SHA256="cc76b9b40508253f812af5e52d4630e90230312969eece04ccfb5328c557acac"
ENV GCLOUD_VERSION=478.0.0
ENV GCLOUD_SHA256="225c3a1f9b47241467a4ad8da0f432a57bade10c8d44158920003ae698f6d195"

RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz
RUN echo "${GCLOUD_SHA256} google-cloud-cli-${GCLOUD_VERSION}-linux-x86_64.tar.gz" | sha256sum -c
Expand All @@ -94,7 +93,7 @@ RUN ./google-cloud-sdk/bin/gcloud components install kubectl gke-gcloud-auth-plu
# garden-azure-base
#
FROM garden-base-root as garden-azure-base
ENV AZURE_CLI_VERSION=2.53.0
ENV AZURE_CLI_VERSION=2.61.0

RUN apt-get update
RUN apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
Expand All @@ -105,7 +104,7 @@ RUN chmod go+r /etc/apt/keyrings/microsoft.gpg
RUN echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/azure-cli.list
RUN apt-get update
RUN apt-get install azure-cli=${AZURE_CLI_VERSION}-1~buster
RUN apt-get install azure-cli=${AZURE_CLI_VERSION}-1~bookworm
RUN az aks install-cli

#
Expand All @@ -123,7 +122,7 @@ COPY --chown=$USER:root --from=garden-azure-base /usr/local/bin/kubelogin /usr/l
# garden-aws
#
FROM garden-base as garden-aws
ENV AWSCLI_VERSION=2.13.15
ENV AWSCLI_VERSION=2.16.0
# Copy aws cli
RUN mkdir -p ${HOME}/aws-cli
COPY --chown=$USER:root --from=garden-aws-base /usr/local/aws-cli ${HOME}/aws-cli
Expand All @@ -144,7 +143,7 @@ ENV PATH /google-cloud-sdk/bin:$PATH
# garden-aws-gloud
#
FROM garden-base as garden-aws-gcloud
ENV AWSCLI_VERSION=2.13.15
ENV AWSCLI_VERSION=2.16.0

# Copy aws cli
RUN mkdir -p ${HOME}/aws-cli
Expand All @@ -161,7 +160,7 @@ ENV PATH /google-cloud-sdk/bin:$PATH
# garden-aws-gloud-azure
#
FROM garden-base as garden-aws-gcloud-azure
ENV AWSCLI_VERSION=2.13.15
ENV AWSCLI_VERSION=2.16.0

# Copy aws cli
RUN mkdir -p ${HOME}/aws-cli
Expand Down
58 changes: 29 additions & 29 deletions support/docker-bake-test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TEST "test cloud provider tool availability"
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" all

# aws
for variant in bonsai{-alpine,-buster}{,-rootless}
for variant in bonsai{-alpine,-bookworm}{,-rootless}
do
echo "gardendev/garden-aws-gcloud-azure:$variant"
should_succeed aws --version gardendev/garden-aws-gcloud-azure:$variant
Expand Down Expand Up @@ -101,7 +101,7 @@ TEST "run all binaries"
MAJOR_VERSION=0 MINOR_VERSION=13 PATCH_VERSION=0 CODENAME=bonsai \
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" all

for variant in bonsai{-alpine,-buster}{,-rootless}
for variant in bonsai{-alpine,-bookworm}{,-rootless}
do
# Garden on vanilla images
should_succeed garden version gardendev/garden:$variant
Expand Down Expand Up @@ -131,17 +131,17 @@ TEST "run all binaries"

TEST "edge tags for debian"
MAJOR_VERSION=0 MINOR_VERSION=13 PRERELEASE=edge CODENAME=bonsai \
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" buster
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" bookworm

for image in gardendev/garden{,-aws,-azure,-gcloud,-aws-gcloud,-aws-gcloud-azure}
do
should_not_exist $image latest
should_not_exist $image 0.13-buster
should_not_exist $image 0.13-buster-rootless
should_exist $image 0.13-edge-buster
should_exist $image 0.13-edge-buster-rootless
should_exist $image bonsai-edge-buster
should_exist $image bonsai-edge-buster-rootless
should_not_exist $image 0.13-bookworm
should_not_exist $image 0.13-bookworm-rootless
should_exist $image 0.13-edge-bookworm
should_exist $image 0.13-edge-bookworm-rootless
should_exist $image bonsai-edge-bookworm
should_exist $image bonsai-edge-bookworm-rootless
done

TEST "edge tags for alpine"
Expand All @@ -161,20 +161,20 @@ TEST "edge tags for alpine"

TEST "prerelase tags for debian"
MAJOR_VERSION=0 MINOR_VERSION=13 PATCH_VERSION=0 PRERELEASE=alpha1 CODENAME=bonsai \
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" buster
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" bookworm


for image in gardendev/garden{,-aws,-azure,-gcloud,-aws-gcloud,-aws-gcloud-azure}
do
should_not_exist $image latest
should_not_exist $image 0.13-buster
should_not_exist $image 0.13-buster-rootless
should_not_exist $image 0.13-alpha1-buster
should_not_exist $image 0.13-alpha1-buster-rootless
should_not_exist $image bonsai-alpha1-buster
should_not_exist $image bonsai-alpha1-buster-rootless
should_exist gardendev/garden 0.13.0-alpha1-buster
should_exist gardendev/garden 0.13.0-alpha1-buster-rootless
should_not_exist $image 0.13-bookworm
should_not_exist $image 0.13-bookworm-rootless
should_not_exist $image 0.13-alpha1-bookworm
should_not_exist $image 0.13-alpha1-bookworm-rootless
should_not_exist $image bonsai-alpha1-bookworm
should_not_exist $image bonsai-alpha1-bookworm-rootless
should_exist gardendev/garden 0.13.0-alpha1-bookworm
should_exist gardendev/garden 0.13.0-alpha1-bookworm-rootless
done

TEST "prerelease tags for alpine"
Expand All @@ -196,22 +196,22 @@ TEST "prerelease tags for alpine"

TEST "production release tags for debian"
MAJOR_VERSION=0 MINOR_VERSION=13 PATCH_VERSION=0 CODENAME=bonsai \
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" buster
docker buildx bake --progress=plain -f "$(dirname "$0")/docker-bake.hcl" bookworm


for image in gardendev/garden{,-aws,-azure,-gcloud,-aws-gcloud,-aws-gcloud-azure}
do
should_not_exist $image latest
should_exist $image 0.13-buster
should_exist $image 0.13-buster-rootless
should_exist $image 0.13.0-buster
should_exist $image 0.13.0-buster-rootless
should_exist $image bonsai-buster
should_exist $image bonsai-buster-rootless
should_not_exist $image 0.13-edge-buster
should_not_exist $image 0.13-edge-buster-rootless
should_not_exist $image bonsai-edge-buster
should_not_exist $image bonsai-edge-buster-rootless
should_exist $image 0.13-bookworm
should_exist $image 0.13-bookworm-rootless
should_exist $image 0.13.0-bookworm
should_exist $image 0.13.0-bookworm-rootless
should_exist $image bonsai-bookworm
should_exist $image bonsai-bookworm-rootless
should_not_exist $image 0.13-edge-bookworm
should_not_exist $image 0.13-edge-bookworm-rootless
should_not_exist $image bonsai-edge-bookworm
should_not_exist $image bonsai-edge-bookworm-rootless
done

TEST "production release tags for alpine"
Expand Down
Loading