Skip to content

Docker image usage description#2412

Merged
JelleZijlstra merged 5 commits into
psf:mainfrom
pszlazak:black-docker-image
Nov 16, 2021
Merged

Docker image usage description#2412
JelleZijlstra merged 5 commits into
psf:mainfrom
pszlazak:black-docker-image

Conversation

@pszlazak
Copy link
Copy Markdown
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 requested a review from cooperlees August 6, 2021 17:53
@ichard26 ichard26 added ci: 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
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
pszlazak and others added 3 commits August 7, 2021 09:57
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread docs/usage_and_configuration/black_docker_image.md
Copy link
Copy Markdown
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.

Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
Comment thread docs/usage_and_configuration/black_docker_image.md Outdated
@ichard26 ichard26 requested a review from JelleZijlstra August 31, 2021 02:36
@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 ci: 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.

4 participants