arimelody.me/Dockerfile

24 lines
292 B
Text
Raw Normal View History

2024-09-03 08:07:45 +01:00
FROM golang:1.22 AS build-stage
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /arimelody-web
# ---
FROM scratch
2024-09-03 08:07:45 +01:00
WORKDIR /app
COPY --from=build-stage /arimelody-web /arimelody-web
COPY . .
EXPOSE 8080
CMD ["/arimelody-web"]