yw5ncom/Dockerfile

11 lines
228 B
Docker
Raw Normal View History

2024-09-28 16:00:18 +00:00
FROM docker.io/golang:1.23 as app
COPY src/ .
RUN printf 'module yw5n\ngo 1.23' > go.mod && CGO_ENABLED=0 go build -o /app
FROM scratch
2024-09-28 16:00:18 +00:00
COPY --from=app /app /app
COPY static/ /static/
COPY html/ /html/
EXPOSE 3000
CMD ["/app"]