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.
This commit is contained in:
+4
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user