Skip to content

Commit

Permalink
Merge pull request #1320 from mathbunnyru/asalikhov/bash_codestyle
Browse files Browse the repository at this point in the history
Align bash codestyle
  • Loading branch information
mathbunnyru authored May 22, 2021
2 parents ed559b6 + fbceaa9 commit 33add21
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 41 deletions.
4 changes: 2 additions & 2 deletions all-spark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ENV R_LIBS_USER $SPARK_HOME/R/lib
RUN fix-permissions $R_LIBS_USER

# R pre-requisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
fonts-dejavu \
gfortran \
gcc && \
Expand Down
4 changes: 2 additions & 2 deletions base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ARG miniforge_checksum="d4065b376f81b83cfef0c7316f97bb83337e4ae27eb988828363a578
# Install all OS dependencies for notebook server that starts but lacks all
# features (e.g., download as all possible file formats)
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -q update && \
apt-get install -yq --no-install-recommends \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
tini \
wget \
ca-certificates \
Expand Down
4 changes: 2 additions & 2 deletions base-notebook/fix-permissions
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ for d in "$@"; do
find "$d" \
! \( \
-group "${NB_GID}" \
-a -perm -g+rwX \
-a -perm -g+rwX \
\) \
-exec chgrp "${NB_GID}" {} \; \
-exec chmod g+rwX {} \;
# setuid, setgid *on directories only*
find "$d" \
\( \
-type d \
-a ! -perm -6000 \
-a ! -perm -6000 \
\) \
-exec chmod +6000 {} \;
done
4 changes: 2 additions & 2 deletions datascience-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ ARG julia_version="1.6.0"
ARG julia_checksum="463b71dc70ca7094c0e0fd6d55d130051a7901e8dec5eb44d6002c57d1bd8585"

# R pre-requisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
fonts-dejavu \
gfortran \
gcc && \
Expand Down
38 changes: 16 additions & 22 deletions docs/using/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,10 @@ FROM $BASE_CONTAINER
USER root

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

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

RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config \
&& echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config \
&& mandb

RUN echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/man" >> /etc/manpath.config && \
echo "MANPATH_MAP ${CONDA_DIR}/bin ${CONDA_DIR}/share/man" >> /etc/manpath.config && \
mandb
```

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

# autosklearn requires swig, which no other image has
RUN apt-get update && \
apt-get install -y --no-install-recommends swig && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends swig && \
apt-get clean && rm -rf /var/lib/apt/lists/*

USER $NB_UID

Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose/notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM jupyter/minimal-notebook:55d5ca6be183
USER root

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

USER $NB_UID

Expand Down
2 changes: 1 addition & 1 deletion examples/make-deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM jupyter/minimal-notebook:2d125a7161b5
USER root

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

USER $NB_UID

Expand Down
7 changes: 4 additions & 3 deletions minimal-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
USER root

# Install all OS dependencies for fully functional notebook server
RUN apt-get update && apt-get install -yq --no-install-recommends \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
build-essential \
vim-tiny \
git \
Expand All @@ -25,8 +26,8 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
# ----
tzdata \
unzip \
nano-tiny \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
nano-tiny && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Create alternative for nano -> nano-tiny
RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10
Expand Down
4 changes: 2 additions & 2 deletions pyspark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ ARG openjdk_version="11"
ENV APACHE_SPARK_VERSION="${spark_version}" \
HADOOP_VERSION="${hadoop_version}"

RUN apt-get -y update && \
apt-get install --no-install-recommends -y \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
"openjdk-${openjdk_version}-jre-headless" \
ca-certificates-java && \
apt-get clean && rm -rf /var/lib/apt/lists/*
Expand Down
4 changes: 2 additions & 2 deletions r-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
USER root

# R pre-requisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
fonts-dejavu \
unixodbc \
unixodbc-dev \
Expand Down
4 changes: 2 additions & 2 deletions scipy-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
USER root

# ffmpeg for matplotlib anim & dvipng+cm-super for latex labels
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg dvipng cm-super && \
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends ffmpeg dvipng cm-super && \
apt-get clean && rm -rf /var/lib/apt/lists/*

USER $NB_UID
Expand Down

0 comments on commit 33add21

Please sign in to comment.