1
0
Fork 0

chore(build): add Dockerfile

This commit is contained in:
Vojtěch Mareš 2024-05-03 21:14:18 +02:00
parent 790c5d1f13
commit ab513af9b9
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM golang:1.22-alpine3.19 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o yggdrasil .
FROM alpine:3.19 AS runtime
WORKDIR /app
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/yggdrasil .
CMD ["/app/yggdrasil"]