Skip to content

Commit 33add21

Browse files
authored
Merge pull request #1320 from mathbunnyru/asalikhov/bash_codestyle
Align bash codestyle
2 parents ed559b6 + fbceaa9 commit 33add21

File tree

11 files changed

+36
-41
lines changed

11 files changed

+36
-41
lines changed

all-spark-notebook/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ENV R_LIBS_USER $SPARK_HOME/R/lib
1212
RUN fix-permissions $R_LIBS_USER
1313

1414
# R pre-requisites
15-
RUN apt-get update && \
16-
apt-get install -y --no-install-recommends \
15+
RUN apt-get update --yes && \
16+
apt-get install --yes --no-install-recommends \
1717
fonts-dejavu \
1818
gfortran \
1919
gcc && \

base-notebook/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ ARG miniforge_checksum="d4065b376f81b83cfef0c7316f97bb83337e4ae27eb988828363a578
4444
# Install all OS dependencies for notebook server that starts but lacks all
4545
# features (e.g., download as all possible file formats)
4646
ENV DEBIAN_FRONTEND noninteractive
47-
RUN apt-get -q update && \
48-
apt-get install -yq --no-install-recommends \
47+
RUN apt-get update --yes && \
48+
apt-get install --yes --no-install-recommends \
4949
tini \
5050
wget \
5151
ca-certificates \

base-notebook/fix-permissions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ for d in "$@"; do
2121
find "$d" \
2222
! \( \
2323
-group "${NB_GID}" \
24-
-a -perm -g+rwX \
24+
-a -perm -g+rwX \
2525
\) \
2626
-exec chgrp "${NB_GID}" {} \; \
2727
-exec chmod g+rwX {} \;
2828
# setuid, setgid *on directories only*
2929
find "$d" \
3030
\( \
3131
-type d \
32-
-a ! -perm -6000 \
32+
-a ! -perm -6000 \
3333
\) \
3434
-exec chmod +6000 {} \;
3535
done

datascience-notebook/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ ARG julia_version="1.6.0"
1919
ARG julia_checksum="463b71dc70ca7094c0e0fd6d55d130051a7901e8dec5eb44d6002c57d1bd8585"
2020

2121
# R pre-requisites
22-
RUN apt-get update && \
23-
apt-get install -y --no-install-recommends \
22+
RUN apt-get update --yes && \
23+
apt-get install --yes --no-install-recommends \
2424
fonts-dejavu \
2525
gfortran \
2626
gcc && \

docs/using/recipes.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,10 @@ FROM $BASE_CONTAINER
253253
USER root
254254

255255
# Remove the manpage blacklist, install man, install docs
256-
RUN rm /etc/dpkg/dpkg.cfg.d/excludes \
257-
&& apt-get update \
258-
&& dpkg -l | grep ^ii | cut -d' ' -f3 | xargs apt-get install -yq --no-install-recommends --reinstall man \
259-
&& apt-get clean \
260-
&& rm -rf /var/lib/apt/lists/*
256+
RUN rm /etc/dpkg/dpkg.cfg.d/excludes && \
257+
apt-get update --yes && \
258+
dpkg -l | grep ^ii | cut -d' ' -f3 | xargs apt-get install --yes --no-install-recommends --reinstall man && \
259+
apt-get clean && rm -rf /var/lib/apt/lists/*
261260

262261
USER $NB_UID
263262
```
@@ -280,10 +279,9 @@ For Ubuntu 18.04 (bionic) and earlier, you may also require to workaround for a
280279
# https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=8197d7824f814c5d4b992b4c8730b5b0f7ec589a
281280
# https://launchpadlibrarian.net/435841763/man-db_2.8.5-2_2.8.6-1.diff.gz
282281

283-
RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config \
284-
&& echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config \
285-
&& mandb
286-
282+
RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config && \
283+
echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config && \
284+
mandb
287285
```
288286

289287
Be sure to check the current base image in `base-notebook` before building.
@@ -417,21 +415,19 @@ ENV HADOOP_CONF_DIR /usr/local/hadoop-2.7.3/etc/hadoop
417415
USER root
418416
# Add proper open-jdk-8 not just the jre, needed for pydoop
419417
RUN echo 'deb https://cdn-fastly.deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list && \
420-
apt-get -y update && \
421-
apt-get install --no-install-recommends -t jessie-backports -y openjdk-8-jdk && \
418+
apt-get update --yes && \
419+
apt-get install --yes --no-install-recommends -t jessie-backports openjdk-8-jdk && \
422420
rm /etc/apt/sources.list.d/jessie-backports.list && \
423-
apt-get clean && \
424-
rm -rf /var/lib/apt/lists/ && \
421+
apt-get clean && rm -rf /var/lib/apt/lists/* && \
425422
# Add hadoop binaries
426423
wget https://mirrors.ukfast.co.uk/sites/ftp.apache.org/hadoop/common/hadoop-2.7.3/hadoop-2.7.3.tar.gz && \
427424
tar -xvf hadoop-2.7.3.tar.gz -C /usr/local && \
428425
chown -R $NB_USER:users /usr/local/hadoop-2.7.3 && \
429426
rm -f hadoop-2.7.3.tar.gz && \
430427
# Install os dependencies required for pydoop, pyhive
431-
apt-get update && \
432-
apt-get install --no-install-recommends -y build-essential python-dev libsasl2-dev && \
433-
apt-get clean && \
434-
rm -rf /var/lib/apt/lists/* && \
428+
apt-get update --yes && \
429+
apt-get install --yes --no-install-recommends build-essential python-dev libsasl2-dev && \
430+
apt-get clean && rm -rf /var/lib/apt/lists/* && \
435431
# Remove the example hadoop configs and replace
436432
# with those for our cluster.
437433
# Alternatively this could be mounted as a volume
@@ -521,11 +517,9 @@ FROM jupyter/scipy-notebook:latest
521517
USER root
522518

523519
# autosklearn requires swig, which no other image has
524-
RUN apt-get update && \
525-
apt-get install -y --no-install-recommends swig && \
526-
apt-get clean && \
527-
rm -rf /var/lib/apt/lists/*
528-
520+
RUN apt-get update --yes && \
521+
apt-get install --yes --no-install-recommends swig && \
522+
apt-get clean && rm -rf /var/lib/apt/lists/*
529523

530524
USER $NB_UID
531525

examples/docker-compose/notebook/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM jupyter/minimal-notebook:55d5ca6be183
77
USER root
88

99
# Add permanent apt-get installs and other root commands here
10-
# e.g., RUN apt-get install npm nodejs
10+
# e.g., RUN apt-get install --yes --no-install-recommends npm nodejs
1111

1212
USER $NB_UID
1313

examples/make-deploy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM jupyter/minimal-notebook:2d125a7161b5
77
USER root
88

99
# Add permanent apt-get installs and other root commands here
10-
# e.g., RUN apt-get install npm nodejs
10+
# e.g., RUN apt-get install --yes --no-install-recommends npm nodejs
1111

1212
USER $NB_UID
1313

minimal-notebook/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ LABEL maintainer="Jupyter Project <[email protected]>"
88
USER root
99

1010
# Install all OS dependencies for fully functional notebook server
11-
RUN apt-get update && apt-get install -yq --no-install-recommends \
11+
RUN apt-get update --yes && \
12+
apt-get install --yes --no-install-recommends \
1213
build-essential \
1314
vim-tiny \
1415
git \
@@ -25,8 +26,8 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
2526
# ----
2627
tzdata \
2728
unzip \
28-
nano-tiny \
29-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
29+
nano-tiny && \
30+
apt-get clean && rm -rf /var/lib/apt/lists/*
3031

3132
# Create alternative for nano -> nano-tiny
3233
RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10

pyspark-notebook/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ ARG openjdk_version="11"
2121
ENV APACHE_SPARK_VERSION="${spark_version}" \
2222
HADOOP_VERSION="${hadoop_version}"
2323

24-
RUN apt-get -y update && \
25-
apt-get install --no-install-recommends -y \
24+
RUN apt-get update --yes && \
25+
apt-get install --yes --no-install-recommends \
2626
"openjdk-${openjdk_version}-jre-headless" \
2727
ca-certificates-java && \
2828
apt-get clean && rm -rf /var/lib/apt/lists/*

r-notebook/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ LABEL maintainer="Jupyter Project <[email protected]>"
88
USER root
99

1010
# R pre-requisites
11-
RUN apt-get update && \
12-
apt-get install -y --no-install-recommends \
11+
RUN apt-get update --yes && \
12+
apt-get install --yes --no-install-recommends \
1313
fonts-dejavu \
1414
unixodbc \
1515
unixodbc-dev \

0 commit comments

Comments
 (0)