Merged in feature/postprocessing (pull request #114)
Feature/postprocessing * tests * passtest * fixshorttests * mosttests * improvingbasedockerfile * testspeeds * testing * host * canparallel * clean * passfullsuite * singlepagemax * test * findfeatures * findstables * tbls * tablestoo * tablestoo * lateraltests * tableloc * cleanup * inlinetable * childids * cleanup * tests
This commit is contained in:
+18
-6
@@ -6,18 +6,30 @@ FROM golang:${GO_VERSION} AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Git if not already present
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends git=1:2.* && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends git=1:2.* musl-tools=1.2.* \
|
||||
&& apt-get clean && \
|
||||
\rm -rf /var/lib/apt-get/lists/*
|
||||
|
||||
|
||||
# Copy the entire repository including .git directory
|
||||
COPY . .
|
||||
|
||||
RUN go mod verify
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENV CGO_ENABLED=1
|
||||
ENV GOARCH=${TARGETARCH}
|
||||
ENV CC=musl-gcc
|
||||
|
||||
# Must be same a github.com/gen2brain/go-fitz in go.mod
|
||||
# ENV FZ_VERSION=1.24.14
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod/ \
|
||||
CGO_ENABLED=0 GOARCH=$TARGETARCH go build -o /bin ./cmd/...
|
||||
go build \
|
||||
-mod vendor \
|
||||
-tags musl \
|
||||
-ldflags "-linkmode external -extldflags -static" \
|
||||
-o /bin ./cmd/...
|
||||
|
||||
FROM scratch AS final
|
||||
|
||||
|
||||
Reference in New Issue
Block a user