Skip to content

Commit cd026bc

Browse files
committed
Debian 12, Postgres 18, doctl 1.45.0, and amd/arm build-arg option`
1 parent 02a03b6 commit cd026bc

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Dockerfile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
FROM debian:12.7-slim
1+
FROM debian:12-slim
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5+
# install the correct binaries for the build architecture
6+
ARG BUILD_ARCH=amd64
7+
58
RUN apt update && \
69
apt upgrade -y && \
710
apt install -y --no-install-recommends \
8-
curl ca-certificates git gnupg2 python3 pipx unzip vim wget && \
11+
curl ca-certificates git gnupg2 python3 pipx unzip vim wget && \
912
# Docker
1013
install -m 0755 -d /etc/apt/keyrings && \
1114
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
1215
chmod a+r /etc/apt/keyrings/docker.gpg && \
1316
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
14-
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
15-
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
17+
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
18+
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
1619
apt-get update && \
1720
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && \
1821
# https://www.postgresql.org/download/linux/debian/
1922
install -d /usr/share/postgresql-common/pgdg && \
2023
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
2124
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" \
22-
> /etc/apt/sources.list.d/pgdg.list && \
23-
apt update && apt install -y --no-install-recommends postgresql-client-17 && \
25+
> /etc/apt/sources.list.d/pgdg.list && \
26+
apt update && apt install -y --no-install-recommends postgresql-client-18 && \
2427
# rclone
2528
curl https://rclone.org/install.sh | bash && \
2629
rm -rf /var/lib/apt/lists/*
@@ -30,7 +33,7 @@ RUN pipx install awscli
3033
RUN pipx install yamllint
3134

3235
# kubectl
33-
RUN curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
36+
RUN curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/${BUILD_ARCH}/kubectl" && \
3437
mv kubectl /usr/local/bin/kubectl && \
3538
chmod +x /usr/local/bin/kubectl && \
3639
kubectl version --client
@@ -42,11 +45,11 @@ RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-he
4245
RUN helm plugin install https://github.com/hypnoglow/helm-s3.git
4346

4447
# Digital Ocean CLI (doctl)
45-
RUN DOCTL_VERSION=1.115.0 && \
46-
wget https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz && \
47-
tar xf ./doctl-${DOCTL_VERSION}-linux-amd64.tar.gz && \
48+
RUN DOCTL_VERSION=1.145.0 && \
49+
wget https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-${BUILD_ARCH}.tar.gz && \
50+
tar xf ./doctl-${DOCTL_VERSION}-linux-${BUILD_ARCH}.tar.gz && \
4851
mv ./doctl /usr/local/bin && \
49-
rm ./doctl-${DOCTL_VERSION}-linux-amd64.tar.gz && \
52+
rm ./doctl-${DOCTL_VERSION}-linux-${BUILD_ARCH}.tar.gz && \
5053
doctl help
5154

5255
CMD bash

0 commit comments

Comments
 (0)