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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added clarifications about customizing docker images #3604
Conversation
Hi @timblaktu thanks for helping on this. As you can see, github actions are complaining about lints and docs targets. Could you take a look at contribution guide (https://github.com/ansible-community/molecule/blob/main/docs/contributing.rst), especially on #lints and #docs targets and adapt PR ? |
@jseguillon now we're green. Sorry for the delay and commit proliferation, I don't have the tooling set up locally and was just leaning on Github for editing/linting. Let me know if you'd like to see anything else or have any questions. |
LGTM but I don't use much Docker with molecule. |
I'll have a look at it |
9426fdf
to
a77afd5
Compare
a77afd5
to
14ddfc7
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Co-authored-by: Jack <jack4zhang@gmail.com>
14ddfc7
to
37ecb8d
Compare
Do you have concerns? |
No, no concerns. Lucky me, I only just managed to catch Covid and am now slowly recovering from it. So I was knocked out for a couple of days and was not able to answer. Sorry :( |
|
||
1. ``platforms[*].image``: Docker image name:tag to use as base image. | ||
2. ``platforms[*].pre_build_image``: Whether to customize base image or use | ||
as-is[^1]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @timblaktu, thank you for this PR!
As this PR is already closed, I am not sure if this is the right place to mention this.
But let me do it anyway, if I should create a separate issue/PR, just let me know.
The footnotes in this PR do not render correctly in https://molecule.readthedocs.io/en/latest/examples.html.
The documentation is composed as SphinxDoc/reStructuredText the footnote reference should look like this: [#name]_
.
For example, this line could look like this:
as-is `[#dockerimplementation]_`.
|
||
Append the following code block to the end of ``Dockerfile.j2``. It creates an | ||
``ansible`` user with passwordless sudo privileges. Note the variable | ||
``SUDO_GROUP`` depends on the target distribution[^2]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and this, like this:
``SUDO_GROUP`` depends on the target distribution [#sudogroup]_.
|
||
[^1]: [Implementation in molecule-docker](https://github.com/ansible-community/molecule-docker/blob/f4efce3c4fda226c8ca5f10976927fff7daa8e69/src/molecule_docker/playbooks/create.yml#L35) | ||
[^2]: e.g. [Debian uses `sudo` instead of `wheel` group.](https://wiki.debian.org/sudo/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the footnote body should then look like this:
.. [#dockerimplementation]: `Implementation in molecule-docker <https://github.com/ansible-community/molecule-docker/blob/f4efce3c4fda226c8ca5f10976927fff7daa8e69/src/molecule_docker/playbooks/create.yml#L35>`_)
.. [#sudogroup]: e.g. `Debian uses `sudo` instead of `wheel` group. <https://wiki.debian.org/sudo/>`_
Note, that inline (external) web links also look different in SphinxDoc/rST. I also updated the links.
Provides some clarification about how docker image customization works. This info had to be gleaned from the source code and external sources like reddit and SO.
I hope this community feedback will be adopted to ease adoption of future molecule users.
Resolves #3603.