Files
cloudnest/deployments/docker/file-service.Dockerfile
T

18 lines
422 B
Docker

FROM golang:1.22-alpine AS builder
WORKDIR /src
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/file-service ./cmd/file-service
FROM alpine:3.19
RUN apk --no-cache add ca-certificates tzdata && adduser -D -u 10002 app
WORKDIR /app
COPY --from=builder /out/file-service /app/file-service
USER app
EXPOSE 8082
ENTRYPOINT ["/app/file-service"]