mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 23:12:56 +00:00
Final review
This commit is contained in:
@@ -143,4 +143,4 @@ RUN fix-permissions /etc/jupyter/
|
||||
# Switch back to jovyan to avoid accidental container runs as root
|
||||
USER $NB_UID
|
||||
|
||||
WORKDIR $HOME
|
||||
WORKDIR $HOME
|
||||
|
@@ -32,7 +32,6 @@ ENV JULIA_VERSION=1.4.1
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
# TODO
|
||||
# hadolint ignore=SC2046
|
||||
RUN mkdir "/opt/julia-${JULIA_VERSION}" && \
|
||||
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()' && \
|
||||
rm -rf "${HOME}/.local" && \
|
||||
fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter"
|
||||
|
||||
WORKDIR $HOME
|
||||
WORKDIR $HOME
|
||||
|
@@ -1,10 +1,10 @@
|
||||
# Image Lint
|
||||
|
||||
We are using the [Hadolint][LK1] tool to analyse each `Dockerfile` to comply with [Docker best practices][LK2].
|
||||
To comply with [Docker best practices][LK2], we are using the [Hadolint][LK1] tool to analyse each `Dockerfile` .
|
||||
|
||||
## Install
|
||||
## Installation
|
||||
|
||||
There is a specific make target to install the linter.
|
||||
There is a specific `make` target to install the linter.
|
||||
By default `hadolint` will be installed in `${HOME}/hadolint`.
|
||||
|
||||
```bash
|
||||
@@ -17,7 +17,9 @@ $ make lint-install
|
||||
|
||||
## Lint
|
||||
|
||||
The linter can be run per stack `make lint/<stack>`.
|
||||
### Per Stack
|
||||
|
||||
The linter can be run per stack.
|
||||
|
||||
```bash
|
||||
$ make lint/scipy-notebook
|
||||
@@ -39,15 +41,17 @@ Optionally you can pass arguments to the linter.
|
||||
$ make lint/scipy-notebook ARGS="--format codeclimate"
|
||||
```
|
||||
|
||||
To lint all the stacks.
|
||||
### All the Stacks
|
||||
|
||||
The linter can be run against all the stacks.
|
||||
|
||||
```bash
|
||||
$ make lint-all
|
||||
```
|
||||
|
||||
## Ignore Rules
|
||||
## Ignoring Rules
|
||||
|
||||
Sometimes it's necessary to ignore [some rules][LK3]. The preferred way is to do it in the `Dockerfile`.
|
||||
Sometimes it is necessary to ignore [some rules][LK3]. The preferred way to do it is to flag ignored rules in the `Dockerfile`.
|
||||
|
||||
> 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:
|
||||
|
||||
|
@@ -21,7 +21,6 @@ RUN apt-get -y update && \
|
||||
|
||||
# Using the preferred mirror to download Spark
|
||||
WORKDIR /tmp
|
||||
# TODO
|
||||
# hadolint ignore=SC2046
|
||||
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 | \
|
||||
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' && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
WORKDIR $HOME
|
||||
WORKDIR $HOME
|
||||
|
@@ -75,9 +75,11 @@ RUN git clone https://github.com/PAIR-code/facets.git && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
# Import matplotlib the first time to build the font cache.
|
||||
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
|
||||
ENV XDG_CACHE_HOME="/home/${NB_USER}/.cache/"
|
||||
|
||||
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
USER $NB_UID
|
||||
WORKDIR $HOME
|
||||
|
||||
WORKDIR $HOME
|
||||
|
Reference in New Issue
Block a user