-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (29 loc) · 1.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM golang:1.22-bookworm
WORKDIR /app
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=SC1091
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl=7.88.1-10+deb12u8 \
git=1:2.39.5-0+deb12u1 \
jq=1.6-2.1 \
sudo=1.9.13p3-1+deb12u1 \
ca-certificates=20230311 && \
install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
chmod a+r /etc/apt/keyrings/docker.asc && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
apt-get install -y --no-install-recommends \
docker-ce=5:27.4.0-1~debian.12~bookworm \
docker-ce-cli=5:27.4.0-1~debian.12~bookworm \
containerd.io=1.7.24-1 \
docker-buildx-plugin=0.19.2-1~debian.12~bookworm \
docker-compose-plugin=2.31.0-1~debian.12~bookworm && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY . ./
RUN go mod download && \
go build -o /app/rollout && \
go clean -cache -modcache
ENTRYPOINT [ "/app/rollout"]