Skip to content

Commit e1151d8

Browse files
committed
Move kubectl install next to the AWS CLI install and trim the comment
1 parent 18ba752 commit e1151d8

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

docker/pulumi/Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,20 @@ RUN \
6565
./aws/install && \
6666
rm -rf aws && \
6767
rm awscliv2.zip && \
68-
# Add additional apt repos using modern keyrings approach
69-
mkdir -p /etc/apt/keyrings && \
70-
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
71-
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/google-cloud.gpg && \
72-
echo "deb [arch=${TARGETARCH} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list && \
73-
echo "deb [signed-by=/etc/apt/keyrings/google-cloud.gpg] http://packages.cloud.google.com/apt cloud-sdk-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list && \
74-
# kubectl, from the official release binaries and verified against the published checksum.
75-
# Installed this way rather than from apt so we get a version-stamped build: the Google Cloud
76-
# SDK repo added above also publishes a `kubectl` package, and resolving between the two can
77-
# yield a binary whose `kubectl version` reports `v0.0.0-master+$Format:%H$`, which breaks any
78-
# tooling that parses the client version.
68+
# kubectl from the official release binaries
7969
KUBE_LATEST=$(curl --proto "=https" --tlsv1.2 --fail --location --silent --show-error https://dl.k8s.io/release/stable.txt) && \
8070
KUBECTL_BASE_URL="https://dl.k8s.io/release/${KUBE_LATEST}/bin/linux/${TARGETARCH}" && \
8171
curl --proto "=https" --tlsv1.2 --fail --location --remote-name "${KUBECTL_BASE_URL}/kubectl" && \
8272
curl --proto "=https" --tlsv1.2 --fail --location --silent --show-error "${KUBECTL_BASE_URL}/kubectl.sha256" \
8373
| awk '{print $1" kubectl"}' | sha256sum --check - && \
8474
install --mode 755 kubectl /usr/bin/kubectl && \
8575
rm kubectl && \
76+
# Add additional apt repos using modern keyrings approach
77+
mkdir -p /etc/apt/keyrings && \
78+
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
79+
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/google-cloud.gpg && \
80+
echo "deb [arch=${TARGETARCH} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list && \
81+
echo "deb [signed-by=/etc/apt/keyrings/google-cloud.gpg] http://packages.cloud.google.com/apt cloud-sdk-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list && \
8682
# Install azure-cli (from Debian repos), docker, gcloud
8783
apt-get update -y && \
8884
apt-get install -y \

0 commit comments

Comments
 (0)