diff --git a/backend/mpc-system/services/account/Dockerfile b/backend/mpc-system/services/account/Dockerfile index aff324d8..9706adab 100644 --- a/backend/mpc-system/services/account/Dockerfile +++ b/backend/mpc-system/services/account/Dockerfile @@ -23,7 +23,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ # Final stage FROM alpine:3.18 -RUN apk --no-cache add ca-certificates wget +RUN apk --no-cache add ca-certificates curl RUN adduser -D -s /bin/sh mpc COPY --from=builder /bin/account-service /bin/account-service @@ -32,7 +32,8 @@ USER mpc EXPOSE 50051 8080 +# Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 + CMD curl -sf http://localhost:8080/health || exit 1 ENTRYPOINT ["/bin/account-service"] diff --git a/backend/mpc-system/services/message-router/Dockerfile b/backend/mpc-system/services/message-router/Dockerfile index d47a3682..597c9d19 100644 --- a/backend/mpc-system/services/message-router/Dockerfile +++ b/backend/mpc-system/services/message-router/Dockerfile @@ -23,7 +23,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ # Final stage FROM alpine:3.18 -RUN apk --no-cache add ca-certificates wget +RUN apk --no-cache add ca-certificates curl RUN adduser -D -s /bin/sh mpc COPY --from=builder /bin/message-router /bin/message-router @@ -32,7 +32,8 @@ USER mpc EXPOSE 50051 8080 +# Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 + CMD curl -sf http://localhost:8080/health || exit 1 ENTRYPOINT ["/bin/message-router"] diff --git a/backend/mpc-system/services/server-party/Dockerfile b/backend/mpc-system/services/server-party/Dockerfile index 876ffb09..44439963 100644 --- a/backend/mpc-system/services/server-party/Dockerfile +++ b/backend/mpc-system/services/server-party/Dockerfile @@ -23,7 +23,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ # Final stage FROM alpine:3.18 -RUN apk --no-cache add ca-certificates wget +RUN apk --no-cache add ca-certificates curl RUN adduser -D -s /bin/sh mpc COPY --from=builder /bin/server-party /bin/server-party @@ -32,7 +32,8 @@ USER mpc EXPOSE 50051 8080 +# Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 + CMD curl -sf http://localhost:8080/health || exit 1 ENTRYPOINT ["/bin/server-party"] diff --git a/backend/mpc-system/services/session-coordinator/Dockerfile b/backend/mpc-system/services/session-coordinator/Dockerfile index 478eca5a..6e15cce6 100644 --- a/backend/mpc-system/services/session-coordinator/Dockerfile +++ b/backend/mpc-system/services/session-coordinator/Dockerfile @@ -30,8 +30,8 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ # Final stage FROM alpine:3.18 -# Install ca-certificates for HTTPS -RUN apk --no-cache add ca-certificates wget +# Install ca-certificates and curl for HTTPS and health check +RUN apk --no-cache add ca-certificates curl # Create non-root user RUN adduser -D -s /bin/sh mpc @@ -47,7 +47,7 @@ EXPOSE 50051 8080 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 + CMD curl -sf http://localhost:8080/health || exit 1 # Run the application ENTRYPOINT ["/bin/session-coordinator"]