3d434eedb8
Job Status Get and DB tidy up * initalquery * tests * shorttests * testing queries * job * solvedthequery * updatingdb * fixingtests * repotests * shorttests * docker * testspassed
32 lines
491 B
Docker
32 lines
491 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION=1.23
|
|
|
|
FROM golang:${GO_VERSION} AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
COPY vendor/ vendor/
|
|
COPY cmd/ cmd/
|
|
|
|
ARG TARGETARCH
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
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
|
|
|
|
ENV PWD=/app
|
|
|
|
WORKDIR ${PWD}
|
|
|
|
COPY database/migrations/ database/migrations/
|
|
|
|
COPY --from=build /bin/ .
|
|
|
|
EXPOSE 8080
|