From 92f6ed1c636181e2adba016b91aed9d95876f893 Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Mon, 19 Apr 2021 21:30:52 +1000 Subject: [PATCH] Use 'exec' ENTRYPOINTs Switch from 'shell' to 'exec' ENTRYPOINTs. This removes an unnecessary intermediate shell process, and ensures that k8s termination signals are delivered to the correct process. --- scripts/dockerfiles/Dockerfile.init | 2 +- scripts/dockerfiles/Dockerfile.metrics | 2 +- scripts/dockerfiles/Dockerfile.release | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dockerfiles/Dockerfile.init b/scripts/dockerfiles/Dockerfile.init index d147c27ecc..dcb3cfed6f 100644 --- a/scripts/dockerfiles/Dockerfile.init +++ b/scripts/dockerfiles/Dockerfile.init @@ -28,4 +28,4 @@ COPY --from=builder \ /go/src/github.com/aws/amazon-vpc-cni-k8s/aws-cni-support.sh \ /go/src/github.com/aws/amazon-vpc-cni-k8s/scripts/init.sh /init/ -ENTRYPOINT /init/init.sh +ENTRYPOINT ["/init/init.sh"] diff --git a/scripts/dockerfiles/Dockerfile.metrics b/scripts/dockerfiles/Dockerfile.metrics index c2febce1cb..f334797b44 100644 --- a/scripts/dockerfiles/Dockerfile.metrics +++ b/scripts/dockerfiles/Dockerfile.metrics @@ -28,4 +28,4 @@ WORKDIR /app COPY --from=builder /go/src/github.com/aws/amazon-vpc-cni-k8s/cni-metrics-helper /app -ENTRYPOINT /app/cni-metrics-helper --cloudwatch=false +ENTRYPOINT ["/app/cni-metrics-helper", "--cloudwatch=false"] diff --git a/scripts/dockerfiles/Dockerfile.release b/scripts/dockerfiles/Dockerfile.release index be77971b27..42957c68a5 100644 --- a/scripts/dockerfiles/Dockerfile.release +++ b/scripts/dockerfiles/Dockerfile.release @@ -36,4 +36,4 @@ COPY --from=builder /go/src/github.com/aws/amazon-vpc-cni-k8s/aws-cni \ /go/src/github.com/aws/amazon-vpc-cni-k8s/grpc-health-probe \ /go/src/github.com/aws/amazon-vpc-cni-k8s/scripts/entrypoint.sh /app/ -ENTRYPOINT /app/entrypoint.sh +ENTRYPOINT ["/app/entrypoint.sh"]