# Start by building the application. FROM docker.io/golang:1.22 AS build WORKDIR /usr/src/transocks COPY . . RUN go build -trimpath -o transocks ./cmd/transocks # Now copy it into our base image. FROM gcr.io/distroless/static-debian11:nonroot COPY --from=build /usr/src/transocks/transocks /usr/bin/transocks VOLUME [ "/etc/transocks" ] ENTRYPOINT [ "/usr/bin/transocks" ] ARG IMAGE_CREATED ARG IMAGE_VERSION ARG IMAGE_REVISION LABEL org.opencontainers.image.created="${IMAGE_CREATED}" \ org.opencontainers.image.authors="MouseSoft" \ org.opencontainers.image.url="https://git.mousesoft.ru/ms/transocks" \ org.opencontainers.image.documentation="https://git.mousesoft.ru/ms/transocks/src/branch/master/README.md" \ org.opencontainers.image.source="https://git.mousesoft.ru/ms/transocks" \ org.opencontainers.image.version="${IMAGE_VERSION}" \ org.opencontainers.image.revision="${IMAGE_REVISION}" \ org.opencontainers.image.vendor="MouseSoft" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.title="transocks - a transparent SOCKS5/HTTP proxy" \ org.opencontainers.image.description="transocks is a background service to redirect TCP connections transparently to a SOCKS5 server or a HTTP proxy server like Squid."