2024-11-28 15:00:22 +01:00
|
|
|
FROM golang:1.23-alpine AS builder
|
2024-10-11 20:43:08 +02:00
|
|
|
RUN <<EOF
|
2024-12-05 22:39:01 +01:00
|
|
|
apk -U upgrade
|
2024-10-11 20:43:08 +02:00
|
|
|
apk -U add git
|
|
|
|
mkdir -p /opt
|
|
|
|
cd /opt
|
2024-12-09 18:11:29 +01:00
|
|
|
git clone https://github.com/ryanolee/go-pot -b v1.0.0
|
2024-10-11 20:43:08 +02:00
|
|
|
EOF
|
|
|
|
WORKDIR /opt/go-pot
|
|
|
|
#
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot
|
|
|
|
#
|
2024-11-28 15:55:27 +01:00
|
|
|
FROM scratch
|
2024-10-11 20:43:08 +02:00
|
|
|
#
|
|
|
|
COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot
|
2024-11-29 14:44:23 +01:00
|
|
|
COPY dist/config.yml /opt/go-pot/config.yml
|
2024-10-11 20:43:08 +02:00
|
|
|
#
|
2024-10-18 21:59:29 +02:00
|
|
|
STOPSIGNAL SIGINT
|
2024-11-28 15:00:22 +01:00
|
|
|
USER 2000:2000
|
2024-10-11 20:43:08 +02:00
|
|
|
WORKDIR /opt/go-pot
|
|
|
|
CMD ["start", "--host", "0.0.0.0", "--config-file", "config.yml"]
|
|
|
|
ENTRYPOINT ["./go-pot"]
|