14 lines
223 B
Docker
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"]
|