chore: add Dockerfile

This commit is contained in:
Bastien Riviere 2024-01-29 21:25:57 +01:00
parent 31fde6cad6
commit 38f29e147f
Signed by: babariviere
GPG key ID: 4E5F0839249F162E

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
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"]