71
Some checks failed
Deploy Production / Deploy to Staging (push) Has been skipped
Go Linter / Run golangci-lint (api_gateway) (push) Failing after 2m31s
Go Linter / Build golang services (api_gateway) (push) Has been skipped
Go Linter / Tag Commit (push) Has been skipped
Go Linter / Push Docker Images (api_gateway) (push) Has been skipped
Some checks failed
Deploy Production / Deploy to Staging (push) Has been skipped
Go Linter / Run golangci-lint (api_gateway) (push) Failing after 2m31s
Go Linter / Build golang services (api_gateway) (push) Has been skipped
Go Linter / Tag Commit (push) Has been skipped
Go Linter / Push Docker Images (api_gateway) (push) Has been skipped
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,13 +1,18 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
ARG BUILD_LDFLAGS
|
||||
ARG SWAGGER_HOST=localhost:8000
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN apk add --no-cache make
|
||||
|
||||
COPY go.mod ./
|
||||
RUN go mod download -x
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN SWAGGER_HOST=${SWAGGER_HOST} make docs
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="${BUILD_LDFLAGS}" -trimpath -o main ./cmd/main.go
|
||||
|
||||
FROM alpine:3.18 AS certs
|
||||
@@ -21,8 +26,8 @@ ARG CONFIG_FILE_PATH
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
|
||||
COPY --from=certs /YandexInternalRootCA.crt /etc/.redis/YandexInternalRootCA.crt
|
||||
COPY --from=certs /YandexInternalRootCA.crt /etc/.postgres/YandexInternalRootCA.crt
|
||||
COPY --from=certs /YandexInternalRootCA.crt /root/.redis/YandexInternalRootCA.crt
|
||||
COPY --from=certs /YandexInternalRootCA.crt /root/.postgres/YandexInternalRootCA.crt
|
||||
COPY ${CONFIG_FILE_PATH} /config.yaml
|
||||
|
||||
COPY --from=builder /app/main /main
|
||||
|
||||
Reference in New Issue
Block a user