tpotce/docker/go-pot/Dockerfile

22 lines
501 B
Text
Raw Normal View History

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