royalcat
b2382335ed
Some checks failed
docker / build-docker (linux/amd64) (push) Waiting to run
docker / build-docker (linux/arm/v5) (push) Waiting to run
docker / build-docker (linux/arm/v7) (push) Waiting to run
docker / build-docker (linux/arm64) (push) Waiting to run
docker / build-docker (linux/arm64/v8) (push) Waiting to run
docker / build-docker (linux/riscv64) (push) Waiting to run
docker / build-docker (linux/386) (push) Failing after 5m52s
24 lines
464 B
Docker
24 lines
464 B
Docker
FROM golang:1.22 as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod ./
|
|
COPY go.sum ./
|
|
RUN go mod download
|
|
|
|
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"]
|