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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added clarifications about customizing docker images #3604

Merged
merged 11 commits into from
Jul 6, 2022

Conversation

timblaktu
Copy link
Contributor

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.

@timblaktu timblaktu requested review from a team as code owners June 21, 2022 18:27
@timblaktu timblaktu requested review from greg-hellings, sky-joker, ssbarnea, ganeshrn and cidrblock and removed request for a team June 21, 2022 18:27
@jseguillon
Copy link

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 ?

@timblaktu
Copy link
Contributor Author

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

@jseguillon
Copy link

LGTM but I don't use much Docker with molecule.
Anyone else to comment ?

@ziegenberg
Copy link
Contributor

I'll have a look at it

docs/examples.rst Outdated Show resolved Hide resolved
@zhan9san zhan9san force-pushed the 3603-improve-docker-docs branch from 9426fdf to a77afd5 Compare July 1, 2022 01:26
@zhan9san zhan9san force-pushed the 3603-improve-docker-docs branch from a77afd5 to 14ddfc7 Compare July 1, 2022 03:05
@zhan9san zhan9san force-pushed the 3603-improve-docker-docs branch from 14ddfc7 to 37ecb8d Compare July 6, 2022 07:00
@zhan9san
Copy link
Contributor

zhan9san commented Jul 6, 2022

@ziegenberg

I'll have a look at it

Do you have concerns?

@ssbarnea ssbarnea changed the title 3603: added clarifications about customizing docker images Added clarifications about customizing docker images Jul 6, 2022
@ssbarnea ssbarnea merged commit f434fb1 into ansible:main Jul 6, 2022
@ziegenberg
Copy link
Contributor

@ziegenberg

I'll have a look at it

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

This comment was marked as outdated.


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

This comment was marked as outdated.

Comment on lines +430 to +432

[^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/)

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide basic information about Dockerfile template and pre_build_image driver option
6 participants