-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (17 loc) · 874 Bytes
/
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
FROM golang:1.23.4@sha256:585103a29aa6d4c98bbb45d2446e1fdf41441698bbdf707d1801f5708e479f04 as pf
WORKDIR /build
ENV GO111MODULE=on
COPY main.go /build
RUN CGO_ENABLED=0 go build main.go && mv main pf
FROM bitnami/minideb:bullseye@sha256:4b91a1a97ec08e431c0217866f4a346a37a613c6a3ee9fdbf41e1f5e28d3a60e
WORKDIR /app
RUN apt-get update && \
apt-get install --no-install-recommends -y ca-certificates && \
echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | tee /etc/apt/sources.list.d/twingate.list && \
apt-get update -o Dir::Etc::sourcelist="sources.list.d/twingate.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" && \
apt-get install --no-install-recommends -y twingate && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /app/
COPY --from=pf /build/pf /app/
ENTRYPOINT [ "/app/entrypoint.sh" ]