mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-08 18:44:06 +00:00
Minor improvements
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
To enforce some rules, **linters** are used in this project.
|
To enforce some rules, **linters** are used in this project.
|
||||||
Linters can be run either during the **development phase** (by the developer) or the **integration phase** (by GitHub Actions).
|
Linters can be run either during the **development phase** (by the developer) or the **integration phase** (by GitHub Actions).
|
||||||
To integrate and enforce this process in the project lifecycle, we are using **git hooks** through [pre-commit][pre-commit].
|
To integrate and enforce this process in the project lifecycle, we are using **git hooks** through [pre-commit](https://pre-commit.com/).
|
||||||
|
|
||||||
## Using pre-commit hooks
|
## Using pre-commit hooks
|
||||||
|
|
||||||
@@ -44,11 +44,12 @@ More information can be found in [`.pre-commit-config.yaml` file](https://github
|
|||||||
|
|
||||||
## Image Lint
|
## Image Lint
|
||||||
|
|
||||||
To comply with [Docker best practices][dbp], we are using the [Hadolint][hadolint] tool to analyze each `Dockerfile`.
|
To comply with [Docker best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices),
|
||||||
|
we are using the [Hadolint](https://github.com/hadolint/hadolint) tool to analyze each `Dockerfile`.
|
||||||
|
|
||||||
### Ignoring Rules
|
### Ignoring Rules
|
||||||
|
|
||||||
Sometimes it is necessary to ignore [some rules][rules].
|
Sometimes it is necessary to ignore [some rules](https://github.com/hadolint/hadolint#rules).
|
||||||
The following rules are ignored by default for all images in the `.hadolint.yaml` file.
|
The following rules are ignored by default for all images in the `.hadolint.yaml` file.
|
||||||
|
|
||||||
- [`DL3006`][dl3006]: We use a specific policy to manage image tags.
|
- [`DL3006`][dl3006]: We use a specific policy to manage image tags.
|
||||||
@@ -70,10 +71,6 @@ FROM ubuntu
|
|||||||
RUN cd /tmp && echo "hello!"
|
RUN cd /tmp && echo "hello!"
|
||||||
```
|
```
|
||||||
|
|
||||||
[hadolint]: https://github.com/hadolint/hadolint
|
|
||||||
[dbp]: https://docs.docker.com/develop/develop-images/dockerfile_best-practices
|
|
||||||
[rules]: https://github.com/hadolint/hadolint#rules
|
|
||||||
[dl3006]: https://github.com/hadolint/hadolint/wiki/DL3006
|
[dl3006]: https://github.com/hadolint/hadolint/wiki/DL3006
|
||||||
[dl3008]: https://github.com/hadolint/hadolint/wiki/DL3008
|
[dl3008]: https://github.com/hadolint/hadolint/wiki/DL3008
|
||||||
[dl3013]: https://github.com/hadolint/hadolint/wiki/DL3013
|
[dl3013]: https://github.com/hadolint/hadolint/wiki/DL3013
|
||||||
[pre-commit]: https://pre-commit.com/
|
|
||||||
|
@@ -12,7 +12,7 @@ Following these steps will:
|
|||||||
4. Update the [list of community stacks](../using/selecting.md#community-stacks) in this documentation to include your image.
|
4. Update the [list of community stacks](../using/selecting.md#community-stacks) in this documentation to include your image.
|
||||||
|
|
||||||
This approach mirrors how we build and share the core stack images.
|
This approach mirrors how we build and share the core stack images.
|
||||||
Feel free to follow it or pave your own path using alternative services and build tools.
|
Feel free to follow it or pave your path using alternative services and build tools.
|
||||||
|
|
||||||
## Creating a Project
|
## Creating a Project
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ defined in the [conftest.py](https://github.com/jupyter/docker-stacks/blob/main/
|
|||||||
You can add a unit test if you want to run a Python script in one of our images.
|
You can add a unit test if you want to run a Python script in one of our images.
|
||||||
You should create a `tests/<somestack>/units/` directory, if it doesn't already exist, and put your file there.
|
You should create a `tests/<somestack>/units/` directory, if it doesn't already exist, and put your file there.
|
||||||
Files in this folder will be executed in the container when tests are run.
|
Files in this folder will be executed in the container when tests are run.
|
||||||
You can see an [example for the TensorFlow package here](https://github.com/jupyter/docker-stacks/blob/HEAD/tests/tensorflow-notebook/units/unit_tensorflow.py).
|
You can see an [TensorFlow package example here](https://github.com/jupyter/docker-stacks/blob/HEAD/tests/tensorflow-notebook/units/unit_tensorflow.py).
|
||||||
|
|
||||||
## Contributing New Tests
|
## Contributing New Tests
|
||||||
|
|
||||||
|
@@ -401,7 +401,7 @@ This recipe only works for NBCassic with Jupyter Notebook < 7.
|
|||||||
It is recommended to use [jupyterlab-spellchecker](https://github.com/jupyterlab-contrib/spellchecker) in modern environments.
|
It is recommended to use [jupyterlab-spellchecker](https://github.com/jupyterlab-contrib/spellchecker) in modern environments.
|
||||||
```
|
```
|
||||||
|
|
||||||
```{literalinclude} recipe_code/spellcheck_notebookv6.dockerfile
|
```{literalinclude} recipe_code/spellcheck_notebook_v6.dockerfile
|
||||||
:language: docker
|
:language: docker
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user