Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image usage description #2412

Merged
merged 5 commits into from Nov 16, 2021
Merged

Conversation

pszlazak
Copy link
Contributor

@pszlazak pszlazak commented Aug 6, 2021

As mentioned by @cooperlees I described Docker image tags and provided two basic examples of Docker image usage.

Please note that I'm not native English speaker, so be forgiving 馃榾

@ichard26 ichard26 added skip news Pull requests that don't need a changelog entry. T: documentation Improvements to the docs (e.g. new topic, correction, etc) C: packaging Installation and packaging of Black labels Aug 6, 2021
pszlazak and others added 3 commits August 7, 2021 09:57
Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All sounds good to me. Many thanks for this! Once @JelleZijlstra is happy lets merge.

### Check Black version

```console
$ docker run --rm pyfound/black:latest_release black --version
Copy link
Collaborator

@cooperlees cooperlees Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could state --rm is optional, but not needed I don't think really needed. If I was running black a lot on the box I'd leave the container up and execute out of it. But depends on your use case :)

Suggested change
$ docker run --rm pyfound/black:latest_release black --version
$ docker run [--rm] pyfound/black:latest_release black --version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cooperlees - sorry for answering late. I was on vacation with very limited access to the Internet.

I believe Black image is not prepared for constantly running in the background. Nevertheless container can be created with all needed customizations (volume mounting etc.) and started when needed. But it means you have to store your source code always in the same place, so volume mounting works. Or you should have separate container for every place with source code with different volume mounting set.

That's why in provided examples container is removed after command is completed. Of course this is only suggestion.

Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for dropping this for a while! I have a few more wording suggestions.

docs/usage_and_configuration/black_docker_image.md Outdated Show resolved Hide resolved
docs/usage_and_configuration/black_docker_image.md Outdated Show resolved Hide resolved
docs/usage_and_configuration/black_docker_image.md Outdated Show resolved Hide resolved
docs/usage_and_configuration/black_docker_image.md Outdated Show resolved Hide resolved
@JelleZijlstra JelleZijlstra merged commit 1d71639 into psf:main Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black skip news Pull requests that don't need a changelog entry. T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants