mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 10:53:36 +02:00
Update Docker builder images and all staged go.mod `go` lines to 1.26.2 for the root module, agent, cli, bench_server, h2c_test_server, dnsproviders, and socket-proxy. Upgrade coreos/go-oidc, docker/cli, valyala/fasthttp, OpenTelemetry HTTP instrumentation and SDK, Google Cloud auth and API clients, genproto RPC, OCI DNS SDK, and pinned goutils/http packages; advance the goutils submodule pointer.
55 lines
1018 B
Docker
55 lines
1018 B
Docker
# Stage 1: deps
|
|
FROM golang:1.26.2-alpine AS deps
|
|
HEALTHCHECK NONE
|
|
|
|
# package version does not matter
|
|
# trunk-ignore(hadolint/DL3018)
|
|
RUN apk add --no-cache tzdata make libcap-setcap
|
|
|
|
ENV GOPATH=/root/go
|
|
|
|
WORKDIR /src
|
|
|
|
COPY socket-proxy/go.mod socket-proxy/go.sum ./
|
|
|
|
RUN sed -i '/^module github\.com\/yusing\/goutils/!{/github\.com\/yusing\/goutils/d}' go.mod && \
|
|
go mod download -x
|
|
|
|
# Stage 2: builder
|
|
FROM deps AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY Makefile ./
|
|
COPY socket-proxy ./socket-proxy
|
|
COPY goutils ./goutils
|
|
|
|
ARG VERSION
|
|
ENV VERSION=${VERSION}
|
|
|
|
ARG MAKE_ARGS
|
|
ENV MAKE_ARGS=${MAKE_ARGS}
|
|
|
|
ENV GOCACHE=/root/.cache/go-build
|
|
ENV GOPATH=/root/go
|
|
|
|
RUN make ${MAKE_ARGS} docker=1 build
|
|
|
|
# Stage 3: Final image
|
|
FROM scratch
|
|
|
|
LABEL maintainer="yusing@6uo.me"
|
|
LABEL proxy.exclude=1
|
|
|
|
# copy timezone data
|
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
|
|
|
# copy binary
|
|
COPY --from=builder /app/run /app/run
|
|
|
|
WORKDIR /app
|
|
|
|
LABEL proxy.#1.healthcheck.disable=true
|
|
|
|
ENV LISTEN_ADDR=0.0.0.0:2375
|
|
CMD ["/app/run"] |