add
This commit is contained in:
19
trading_assistant_api/services/country/Dockerfile
Normal file
19
trading_assistant_api/services/country/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM golang:1.25.7-alpine3.23 AS builder
|
||||
WORKDIR /workspace
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# copy monorepo workspace and modules needed for country service
|
||||
COPY go.work .
|
||||
COPY common ./common
|
||||
COPY services/country ./services/country
|
||||
|
||||
# download deps and build binary
|
||||
RUN cd services/country && go mod download
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /workspace/bin/country-service ./services/country
|
||||
|
||||
FROM alpine:3.19
|
||||
RUN adduser -D -u 10002 app
|
||||
USER app
|
||||
COPY --from=builder /workspace/bin/country-service /usr/local/bin/country-service
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT ["/usr/local/bin/country-service"]
|
||||
Reference in New Issue
Block a user