From dc3bc1a02d98aa47b078b172cea9fa112f1ef499 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 17 Mar 2022 12:47:03 +0200 Subject: [PATCH 1/3] Do not print git diff on pre-commit fail --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c9ebcd3b..b8155da7 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,7 @@ img-rm-dang: ## remove dangling images (tagged None) pre-commit-all: ## run pre-commit hook on all files - @pre-commit run --all-files --hook-stage manual || (printf "\n\n\n" && git --no-pager diff --color=always) + @pre-commit run --all-files --hook-stage manual pre-commit-install: ## set up the git hook scripts @pre-commit --version @pre-commit install From a0034964d69248ea8686bb797e033b0cf8ecf1e8 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 17 Mar 2022 12:59:17 +0200 Subject: [PATCH 2/3] Fix r-notebook error --- r-notebook/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/r-notebook/Dockerfile b/r-notebook/Dockerfile index 969fdb51..510030c0 100644 --- a/r-notebook/Dockerfile +++ b/r-notebook/Dockerfile @@ -6,6 +6,9 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " +# Fix SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + USER root # R pre-requisites From d35992de687a4db637ac8e2faaafac509ac4ebb3 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 17 Mar 2022 13:07:47 +0200 Subject: [PATCH 3/3] Add explicit pipefail and bash shell to all Dockerfiles --- all-spark-notebook/Dockerfile | 4 ++++ base-notebook/Dockerfile | 3 ++- binder/Dockerfile | 5 +++++ datascience-notebook/Dockerfile | 3 ++- minimal-notebook/Dockerfile | 4 ++++ pyspark-notebook/Dockerfile | 3 ++- r-notebook/Dockerfile | 3 ++- scipy-notebook/Dockerfile | 4 ++++ tensorflow-notebook/Dockerfile | 3 ++- 9 files changed, 27 insertions(+), 5 deletions(-) diff --git a/all-spark-notebook/Dockerfile b/all-spark-notebook/Dockerfile index ec4eda92..3f35e700 100644 --- a/all-spark-notebook/Dockerfile +++ b/all-spark-notebook/Dockerfile @@ -6,6 +6,10 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + USER root # RSpark config diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index c8d69034..294361cd 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -12,7 +12,8 @@ ARG NB_USER="jovyan" ARG NB_UID="1000" ARG NB_GID="100" -# Fix DL4006 +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] USER root diff --git a/binder/Dockerfile b/binder/Dockerfile index 394c00e2..97ce9492 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -7,6 +7,11 @@ ARG BASE_CONTAINER=$OWNER/base-notebook:b418b67c225b FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " + +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + ENV TAG="b418b67c225b" WORKDIR "${HOME}" diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index de7b05c6..9e3877d1 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -6,7 +6,8 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " -# Fix DL4006 +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] USER root diff --git a/minimal-notebook/Dockerfile b/minimal-notebook/Dockerfile index 11ec31e4..f7b495f6 100644 --- a/minimal-notebook/Dockerfile +++ b/minimal-notebook/Dockerfile @@ -6,6 +6,10 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + USER root # Install all OS dependencies for fully functional notebook server diff --git a/pyspark-notebook/Dockerfile b/pyspark-notebook/Dockerfile index f32d697d..6be3c924 100644 --- a/pyspark-notebook/Dockerfile +++ b/pyspark-notebook/Dockerfile @@ -6,7 +6,8 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " -# Fix DL4006 +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] USER root diff --git a/r-notebook/Dockerfile b/r-notebook/Dockerfile index 510030c0..4adb90c8 100644 --- a/r-notebook/Dockerfile +++ b/r-notebook/Dockerfile @@ -6,7 +6,8 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " -# Fix SC3014 +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] USER root diff --git a/scipy-notebook/Dockerfile b/scipy-notebook/Dockerfile index 7ca8d9e7..9385e7d7 100644 --- a/scipy-notebook/Dockerfile +++ b/scipy-notebook/Dockerfile @@ -6,6 +6,10 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + USER root RUN apt-get update --yes && \ diff --git a/tensorflow-notebook/Dockerfile b/tensorflow-notebook/Dockerfile index b01fc212..78a8af28 100644 --- a/tensorflow-notebook/Dockerfile +++ b/tensorflow-notebook/Dockerfile @@ -6,7 +6,8 @@ FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " -# Fix DL4006 +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install Tensorflow