18 lines
270 B
Text
18 lines
270 B
Text
|
FROM golang:latest as builder
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY go.mod go.sum ./
|
||
|
RUN go mod download
|
||
|
|
||
|
COPY . ./
|
||
|
RUN CGO_ENABLED=0 go build -o short .
|
||
|
|
||
|
FROM alpine:latest
|
||
|
RUN apk --no-cache add ca-certificates
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=builder /app/short /short
|
||
|
|
||
|
ENTRYPOINT ["/short"]
|