mod sync and archive plugin
This commit is contained in:
parent
3f01d7032f
commit
237af4a63e
16 changed files with 432 additions and 51 deletions
22
Dockerfile
22
Dockerfile
|
@ -4,24 +4,26 @@ FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod ./
|
||||
COPY go.sum ./
|
||||
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod go mod download all
|
||||
COPY go.work ./
|
||||
COPY go.work.sum ./
|
||||
|
||||
COPY ./plugins ./plugins
|
||||
COPY ./pkg ./pkg
|
||||
COPY ./src ./src
|
||||
COPY ./cmd ./cmd
|
||||
COPY ./server ./server
|
||||
COPY ./edition ./edition
|
||||
|
||||
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod go mod download all
|
||||
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod \
|
||||
GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -tags timetzdata \
|
||||
-o /tstor ./cmd/tstor/main.go
|
||||
-o /tstor-bin ./edition
|
||||
|
||||
RUN chmod +x /tstor-bin
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /tstor /tstor
|
||||
COPY --from=builder /tstor-bin /tstor-bin
|
||||
|
||||
ENTRYPOINT ["/tstor"]
|
||||
CMD ["/tstor-bin"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue