exemplo-imaxes-docker-minimas/Dockerfile
2023-09-05 09:43:11 +02:00

14 lines
223 B
Docker

# Compilado
FROM golang:1.21.0 as builder
WORKDIR /
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
# Execución
FROM scratch
COPY --from=builder /main /main
EXPOSE 8080
CMD ["./main"]