Enhance Dockerfile to build and include a new HTTP API service (mtproxy_checkerd) alongside the existing CLI tool (mtproxy_checker). Update README and documentation to reflect the new service and its usage, including environment variables and Docker run instructions.
Publish mtproxy_checker Docker image / test (push) Successful in 11s
Publish mtproxy_checker Docker image / build-and-push (push) Successful in 56s

This commit is contained in:
Denozordec
2026-04-11 00:50:57 +07:00
parent 4905c06b9b
commit 5a66f0f2e8
8 changed files with 482 additions and 6 deletions
+4 -1
View File
@@ -5,10 +5,13 @@ RUN apk add --no-cache ca-certificates git
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /mtproxy_checker ./cmd/mtproxy_checker
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /mtproxy_checker ./cmd/mtproxy_checker \
&& CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /mtproxy_checkerd ./cmd/mtproxy_checkerd
# Runtime
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=build /mtproxy_checker /usr/local/bin/mtproxy_checker
COPY --from=build /mtproxy_checkerd /usr/local/bin/mtproxy_checkerd
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/mtproxy_checker"]