21 lines
526 B
Docker
21 lines
526 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
|
|
|
|
ENV GOPRIVATE=gitea.pena
|
|
ENV GOINSECURE=gitea.pena
|
|
|
|
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 alpine:latest
|
|
COPY --from=build /app/bitix .
|
|
COPY --from=build /app/validator .
|
|
RUN apk add tzdata
|
|
CMD ["/bitix"]
|