Files
query-orchestration/build/Dockerfile
T
Michael McGuinness fee71e7740 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
2025-04-22 14:40:16 +00:00

43 lines
720 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.24.0
FROM golang:${GO_VERSION} AS build
WORKDIR /app
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 . .
RUN go mod verify
ARG TARGETARCH
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/ \
go build \
-mod vendor \
-tags musl \
-ldflags "-linkmode external -extldflags -static" \
-o /bin ./cmd/...
FROM scratch AS final
ENV PWD=/app
WORKDIR ${PWD}
COPY --from=build /bin/ .
EXPOSE 8080