Files
Will NorrisandWill Norris 97cee318a6 go.mod: bump to tailscale 1.52.0
Technically, this is one commit before the 1.52.0 tag to keep it a
pseudo-version.

Signed-off-by: Will Norris <will@tailscale.com>
2023-10-30 20:29:58 -07:00

25 lines
621 B
Docker

FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/wolfi-base as build
RUN apk update && apk add build-base git openssh go-1.21
WORKDIR /work
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETOS TARGETARCH TARGETVARIANT
RUN \
if [ "${TARGETARCH}" = "arm" ] && [ -n "${TARGETVARIANT}" ]; then \
export GOARM="${TARGETVARIANT#v}"; \
fi; \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -v ./cmd/golink
FROM cgr.dev/chainguard/static:latest
ENV HOME /home/nonroot
COPY --from=build /work/golink /golink
ENTRYPOINT ["/golink"]
CMD ["--sqlitedb", "/home/nonroot/golink.db", "--verbose"]