This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 42f289a  [FLINK-27960] Make the apt-get updating optional
42f289a is described below

commit 42f289a4e56f2acf569cc8da595fc673bb5dcaa0
Author: Aitozi <[email protected]>
AuthorDate: Sun Jun 12 11:04:10 2022 +0800

    [FLINK-27960] Make the apt-get updating optional
---
 .github/workflows/ci.yml          | 2 +-
 .github/workflows/docker-bake.hcl | 3 +++
 Dockerfile                        | 7 +++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fb9f846..1d12c0c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,7 +63,7 @@ jobs:
           export SHELL=/bin/bash
           export DOCKER_BUILDKIT=1
           eval $(minikube -p minikube docker-env)
-          docker build --progress=plain  --build-arg SKIP_TESTS=false 
--no-cache -f ./Dockerfile -t flink-kubernetes-operator:ci-latest .
+          docker build --progress=plain  --build-arg SKIP_TESTS=false 
--build-arg SKIP_OS_UPDATE=false --no-cache -f ./Dockerfile -t 
flink-kubernetes-operator:ci-latest .
           docker images
       - name: Start the operator
         run: |
diff --git a/.github/workflows/docker-bake.hcl 
b/.github/workflows/docker-bake.hcl
index 82b2fee..c7ef2de 100644
--- a/.github/workflows/docker-bake.hcl
+++ b/.github/workflows/docker-bake.hcl
@@ -26,4 +26,7 @@ target "bake-platform" {
     "linux/amd64",
     "linux/arm64/v8",
   ]
+  args = {
+    SKIP_OS_UPDATE = false
+  }
 }
diff --git a/Dockerfile b/Dockerfile
index e15ab4c..061982f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -58,9 +58,12 @@ RUN chown -R flink:flink $FLINK_HOME && \
     chown flink:flink $FLINK_KUBERNETES_SHADED_JAR && \
     chown flink:flink /docker-entrypoint.sh
 
+
+ARG SKIP_OS_UPDATE=true
+
 # Updating Debian
-RUN apt-get update
-RUN apt-get upgrade -y
+RUN if [ "$SKIP_OS_UPDATE" = "false" ]; then apt-get update; fi
+RUN if [ "$SKIP_OS_UPDATE" = "false" ]; then apt-get upgrade -y; fi
 
 USER flink
 ENTRYPOINT ["/docker-entrypoint.sh"]

Reply via email to