17 lines
590 B
Docker
17 lines
590 B
Docker
FROM docker.io/golang:1.23.8-alpine as build
|
|
WORKDIR /app
|
|
ADD pena-ca.crt /usr/local/share/ca-certificates/cacert.crt
|
|
RUN apk add git && update-ca-certificates
|
|
COPY . .
|
|
RUN go mod download
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bitix ./cmd/main.go
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o validator ./cmd/validator/main.go
|
|
|
|
|
|
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/alpine as prod
|
|
RUN apk add --no-cache ca-certificates
|
|
RUN apk add tzdataCOPY --from=build /app/bitix .
|
|
COPY --from=build /app/validator .
|
|
RUN apk add tzdata
|
|
CMD ["/bitix"]
|