mirror of
https://github.com/thecodingrobot/echoip.git
synced 2025-11-30 01:49:26 +01:00
19 lines
419 B
Docker
19 lines
419 B
Docker
# Build
|
|
FROM golang:1.25-trixie AS build
|
|
WORKDIR /go/src/github.com/mpolden/echoip
|
|
COPY . .
|
|
|
|
# Must build without cgo because libc is unavailable in runtime image
|
|
ENV GO111MODULE=on CGO_ENABLED=0
|
|
RUN make
|
|
|
|
# Run
|
|
FROM gcr.io/distroless/static-debian12
|
|
EXPOSE 8080
|
|
|
|
COPY --from=build /go/bin/echoip /opt/echoip/
|
|
COPY html /opt/echoip/html
|
|
COPY data /opt/echoip/data
|
|
|
|
WORKDIR /opt/echoip
|
|
ENTRYPOINT ["/opt/echoip/echoip"]
|