Add Dockerfile and docker-compose.yaml

This commit is contained in:
2023-03-28 22:25:11 +03:00
parent 427bc63884
commit 9262249ea1
3 changed files with 44 additions and 0 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM golang:1.20-alpine as builder
WORKDIR /project
ADD go.* ./
RUN go mod download
ADD . .
RUN CGO_ENABLED=0 go build -o service ./cmd/service/main.go
FROM surnet/alpine-wkhtmltopdf:3.17.0-0.12.6-full
WORKDIR /project
COPY --from=builder /project/service service
ENTRYPOINT ["./service"]