forked from
smokesignal.events/localdev
this repo has no description
1FROM golang:alpine3.21 AS build
2ENV CGO_ENABLED=1
3RUN apk add --no-cache gcc musl-dev
4WORKDIR /workspace
5COPY go.mod /workspace/
6COPY go.sum /workspace/
7RUN go mod download
8COPY main.go /workspace/
9ENV GOCACHE=/root/.cache/go-build
10RUN --mount=type=cache,target="/root/.cache/go-build" go install -ldflags='-s -w -extldflags "-static"' ./main.go
11
12FROM scratch
13COPY --from=build /go/bin/main /usr/local/bin/didadmin
14COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
15ENTRYPOINT [ "/usr/local/bin/didadmin" ]