15adaebfcd
DRAFT PR : WIP working through ideas for integration * movearound * attempttwo * openapi * further sanding * fix * start on tests * runthroughsingleconfig * somechanges * reflectissue * removeerrs * mostlyremovepanic * removeenv * noncfgtests * go * repo * fix service config test * add PWD to all * test fix * fix lint * todo for later * passingunittests * alltests * testlogger * testloggername * clean
29 lines
560 B
Docker
29 lines
560 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
|
|
|
|
ENV PWD=/app
|
|
|
|
WORKDIR ${PWD}
|
|
|
|
COPY database/migrations/ database/migrations/
|
|
|
|
COPY --from=build /bin/ .
|