From 979cfdaf38b28702b7c91416ae8e420e142c3593 Mon Sep 17 00:00:00 2001 From: "Roland.Ma" Date: Tue, 22 Sep 2020 09:14:52 +0000 Subject: [PATCH] optimize docker build Signed-off-by: Roland.Ma --- .dockerignore | 5 +++-- build/ks-controller-manager/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 50609239..8effd60d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ -tmp/ -.github +# exclude all files and folders except bin folder +** +!bin diff --git a/build/ks-controller-manager/Dockerfile b/build/ks-controller-manager/Dockerfile index 263ab11a..c7ba5dd4 100644 --- a/build/ks-controller-manager/Dockerfile +++ b/build/ks-controller-manager/Dockerfile @@ -3,10 +3,10 @@ # that can be found in the LICENSE file. FROM alpine:3.11 -COPY /bin/cmd/controller-manager /usr/local/bin/ - RUN apk add --no-cache ca-certificates +COPY /bin/cmd/controller-manager /usr/local/bin/ + EXPOSE 8443 8080 CMD ["sh"] \ No newline at end of file -- GitLab