Minor improvements

This commit is contained in:
Ayaz Salikhov
2023-11-21 02:40:50 +01:00
parent 809672790e
commit d53e39763d
5 changed files with 7 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
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).
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
@@ -44,11 +44,12 @@ More information can be found in [`.pre-commit-config.yaml` file](https://github
## 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
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.
- [`DL3006`][dl3006]: We use a specific policy to manage image tags.
@@ -70,10 +71,6 @@ FROM ubuntu
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
[dl3008]: https://github.com/hadolint/hadolint/wiki/DL3008
[dl3013]: https://github.com/hadolint/hadolint/wiki/DL3013
[pre-commit]: https://pre-commit.com/

View File

@@ -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.
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

View File

@@ -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 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.
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

View File

@@ -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.
```
```{literalinclude} recipe_code/spellcheck_notebookv6.dockerfile
```{literalinclude} recipe_code/spellcheck_notebook_v6.dockerfile
:language: docker
```