Skip to content

Commit

Permalink
[FLINK-27960] Make the apt-get updating optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi authored and gyfora committed Jun 14, 2022
1 parent 8051ebd commit 42f289a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ target "bake-platform" {
"linux/amd64",
"linux/arm64/v8",
]
args = {
SKIP_OS_UPDATE = false
}
}
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 42f289a

Please sign in to comment.