yw5ncom/Dockerfile

15 lines
275 B
Docker
Raw Permalink Normal View History

2024-10-16 06:10:18 +00:00
ARG VER=1.23
FROM "docker.io/golang:$VER" as build
2024-10-16 07:21:03 +00:00
WORKDIR /build/
2024-10-16 06:10:18 +00:00
ARG VER
COPY main.go .
RUN printf "module yw5n\ngo $VER" > go.mod && CGO_ENABLED=0 go build -o /app
FROM scratch
2024-09-28 16:15:27 +00:00
COPY --from=build /app /app
COPY static/ /static/
COPY html/ /html/
EXPOSE 3000
CMD ["/app"]