tstor/Dockerfile
royalcat 8b7aae8ba7
Some checks failed
docker / build-docker (linux/386) (push) Failing after 11s
docker / build-docker (linux/arm/v5) (push) Failing after 1s
docker / build-docker (linux/arm/v7) (push) Failing after 1s
docker / build-docker (linux/arm64) (push) Failing after 1s
docker / build-docker (linux/arm64/v8) (push) Failing after 6s
docker / build-docker (linux/riscv64) (push) Failing after 0s
docker / build-docker (linux/amd64) (push) Failing after 6m27s
[fix] docker
2024-03-29 01:09:11 +03:00

25 lines
481 B
Docker

FROM golang:1.22 as builder
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY ./pkg ./pkg
COPY ./src ./src
COPY ./cmd ./cmd
COPY ./assets ./assets
COPY ./templates ./templates
COPY embed.go embed.go
RUN go generate ./...
RUN CGO_ENABLED=0 go build -tags timetzdata -o /tstor ./cmd/tstor/main.go
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /tstor /tstor
ENTRYPOINT ["/tstor"]