Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Commit 2ce0b49

Browse files
committed
Final review
1 parent ccc9ed3 commit 2ce0b49

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

base-notebook/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ RUN fix-permissions /etc/jupyter/
143143
# Switch back to jovyan to avoid accidental container runs as root
144144
USER $NB_UID
145145

146-
WORKDIR $HOME
146+
WORKDIR $HOME

datascience-notebook/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ ENV JULIA_VERSION=1.4.1
3232

3333
WORKDIR /tmp
3434

35-
# TODO
3635
# hadolint ignore=SC2046
3736
RUN mkdir "/opt/julia-${JULIA_VERSION}" && \
3837
wget -q https://julialang-s3.julialang.org/bin/linux/x64/$(echo "${JULIA_VERSION}" | cut -d. -f 1,2)"/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" && \
@@ -93,4 +92,4 @@ RUN julia -e 'import Pkg; Pkg.update()' && \
9392
rm -rf "${HOME}/.local" && \
9493
fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter"
9594

96-
WORKDIR $HOME
95+
WORKDIR $HOME

docs/contributing/lint.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Image Lint
22

3-
We are using the [Hadolint][LK1] tool to analyse each `Dockerfile` to comply with [Docker best practices][LK2].
3+
To comply with [Docker best practices][LK2], we are using the [Hadolint][LK1] tool to analyse each `Dockerfile` .
44

5-
## Install
5+
## Installation
66

7-
There is a specific make target to install the linter.
7+
There is a specific `make` target to install the linter.
88
By default `hadolint` will be installed in `${HOME}/hadolint`.
99

1010
```bash
@@ -17,7 +17,9 @@ $ make lint-install
1717

1818
## Lint
1919

20-
The linter can be run per stack `make lint/<stack>`.
20+
### Per Stack
21+
22+
The linter can be run per stack.
2123

2224
```bash
2325
$ make lint/scipy-notebook
@@ -39,15 +41,17 @@ Optionally you can pass arguments to the linter.
3941
$ make lint/scipy-notebook ARGS="--format codeclimate"
4042
```
4143

42-
To lint all the stacks.
44+
### All the Stacks
45+
46+
The linter can be run against all the stacks.
4347

4448
```bash
4549
$ make lint-all
4650
```
4751

48-
## Ignore Rules
52+
## Ignoring Rules
4953

50-
Sometimes it's necessary to ignore [some rules][LK3]. The preferred way is to do it in the `Dockerfile`.
54+
Sometimes it is necessary to ignore [some rules][LK3]. The preferred way to do it is to flag ignored rules in the `Dockerfile`.
5155

5256
> It is also possible to ignore rules by using a special comment directly above the Dockerfile instruction you want to make an exception for. Ignore rule comments look like `# hadolint ignore=DL3001,SC1081`. For example:
5357

pyspark-notebook/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ RUN apt-get -y update && \
2121

2222
# Using the preferred mirror to download Spark
2323
WORKDIR /tmp
24-
# TODO
2524
# hadolint ignore=SC2046
2625
RUN wget -q $(wget -qO- https://www.apache.org/dyn/closer.lua/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz\?as_json | \
2726
python -c "import sys, json; content=json.load(sys.stdin); print(content['preferred']+content['path_info'])") && \
@@ -46,4 +45,4 @@ RUN conda install --quiet -y 'pyarrow' && \
4645
fix-permissions "${CONDA_DIR}" && \
4746
fix-permissions "/home/${NB_USER}"
4847

49-
WORKDIR $HOME
48+
WORKDIR $HOME

scipy-notebook/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ RUN git clone https://github.com/PAIR-code/facets.git && \
7575
fix-permissions "/home/${NB_USER}"
7676

7777
# Import matplotlib the first time to build the font cache.
78-
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
78+
ENV XDG_CACHE_HOME="/home/${NB_USER}/.cache/"
79+
7980
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
8081
fix-permissions "/home/${NB_USER}"
8182

8283
USER $NB_UID
83-
WORKDIR $HOME
84+
85+
WORKDIR $HOME

0 commit comments

Comments
 (0)