first commit 2
This commit is contained in:
16
infra/docker/go-service.Dockerfile
Normal file
16
infra/docker/go-service.Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM golang:1.26-alpine AS build
|
||||
|
||||
ARG SERVICE
|
||||
WORKDIR /src
|
||||
COPY services/go.mod ./
|
||||
COPY services ./
|
||||
RUN go build -o /out/service ./cmd/${SERVICE}
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN adduser -D app
|
||||
USER app
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/service /app/service
|
||||
EXPOSE 8080
|
||||
CMD ["/app/service"]
|
||||
Reference in New Issue
Block a user