Create Dockerfile

This commit is contained in:
P4vlushaaa 2025-01-23 14:02:36 +03:00 committed by GitHub
parent 4357542f09
commit 5726ab5eb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,14 @@
FROM golang:1.20 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/bin/uploader main.go
FROM alpine:3.17
WORKDIR /app
COPY --from=builder /app/bin/uploader /app/uploader
COPY config.yaml /app/config.yaml
EXPOSE 8081
ENTRYPOINT ["/app/uploader"]