diff --git a/Dockerfile b/Dockerfile index a1e9dc5..8b9b82f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,13 @@ -FROM golang:1.18 +FROM golang:1.18 as builder -RUN mkdir /app WORKDIR /app - COPY go.mod ./ COPY go.sum ./ RUN go mod download - COPY . . +RUN CGO_ENABLED=0 go build -o geralt -RUN go build -o /geralt - +FROM alpine:3.15 +COPY --from=builder /app/geralt / EXPOSE 8080 - -CMD [ "/geralt" ] +CMD ["/geralt"]