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
|
2024-09-28 16:16:52 +00:00
|
|
|
|
|
|
|
FROM scratch
|
2024-09-28 16:15:27 +00:00
|
|
|
COPY --from=build /app /app
|
2024-09-28 16:16:52 +00:00
|
|
|
COPY static/ /static/
|
|
|
|
COPY html/ /html/
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/app"]
|