mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-19 16:02:56 +00:00
Final review
This commit is contained in:
@@ -32,7 +32,6 @@ ENV JULIA_VERSION=1.4.1
|
|||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
# TODO
|
|
||||||
# hadolint ignore=SC2046
|
# hadolint ignore=SC2046
|
||||||
RUN mkdir "/opt/julia-${JULIA_VERSION}" && \
|
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" && \
|
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" && \
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
# Image Lint
|
# 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`.
|
By default `hadolint` will be installed in `${HOME}/hadolint`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -17,7 +17,9 @@ $ make lint-install
|
|||||||
|
|
||||||
## Lint
|
## Lint
|
||||||
|
|
||||||
The linter can be run per stack `make lint/<stack>`.
|
### Per Stack
|
||||||
|
|
||||||
|
The linter can be run per stack.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ make lint/scipy-notebook
|
$ make lint/scipy-notebook
|
||||||
@@ -39,15 +41,17 @@ Optionally you can pass arguments to the linter.
|
|||||||
$ make lint/scipy-notebook ARGS="--format codeclimate"
|
$ 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
|
```bash
|
||||||
$ make lint-all
|
$ 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:
|
> 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
|
# Using the preferred mirror to download Spark
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
# TODO
|
|
||||||
# hadolint ignore=SC2046
|
# 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 | \
|
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'])") && \
|
python -c "import sys, json; content=json.load(sys.stdin); print(content['preferred']+content['path_info'])") && \
|
||||||
|
@@ -75,9 +75,11 @@ RUN git clone https://github.com/PAIR-code/facets.git && \
|
|||||||
fix-permissions "/home/${NB_USER}"
|
fix-permissions "/home/${NB_USER}"
|
||||||
|
|
||||||
# Import matplotlib the first time to build the font cache.
|
# 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" && \
|
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
|
||||||
fix-permissions "/home/${NB_USER}"
|
fix-permissions "/home/${NB_USER}"
|
||||||
|
|
||||||
USER $NB_UID
|
USER $NB_UID
|
||||||
|
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
Reference in New Issue
Block a user