Files
query-orchestration/build/Dockerfile
T
Michael McGuinness 6e5c7aedc8 Merged in feature/devbox (pull request #11)
Add Devbox

* adddevbox

* cleanupdockerfile

* testscripts
2025-01-10 12:58:14 +00:00

27 lines
544 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS build
WORKDIR /app
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,target=. \
CGO_ENABLED=0 GOARCH=$TARGETARCH go build -o /bin ./cmd/...
FROM scratch AS final
WORKDIR /app
COPY database/migrations/ database/migrations/
COPY --from=build /bin/ .