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

Use HEREDOCS in Dockerfiles #139

Closed
wants to merge 3 commits into from
Closed

Conversation

rahilarious
Copy link
Contributor

No description provided.

portage.Dockerfile Outdated Show resolved Hide resolved
HEREDOC syntax is supported in docker
https://docs.docker.com/reference/dockerfile/#here-documents

Why:
1) better readability
2) ability to add comments
3) can use HEREDOC in RUN command itself (i.e. configuring
~/.gnupg/dirmngr.conf)
4) by using modern syntax, we can't be labelled as "conservative"[1]

[1] systemd/systemd#31424 (comment)
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
HEREDOC syntax is supported in docker
https://docs.docker.com/reference/dockerfile/#here-documents

Why:
1) better readability
2) ability to add comments
3) can treat it like another bash script

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
HEREDOC syntax is supported in docker
https://docs.docker.com/reference/dockerfile/#here-documents

Why:
1) better readability
2) ability to add comments
3) can use HEREDOC in RUN command itself (i.e. configuring
~/.gnupg/dirmngr.conf)

What else changed:
1) added fallback method to retrieve gpg keys using wkd

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
RUN <<-EOF
set -e

apk add --no-cache ca-certificates gnupg tar wget xz
Copy link

@robbat2 robbat2 Mar 3, 2024

Choose a reason for hiding this comment

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

busybox-tar & busybox-wget are already present in the image

@gentoo-bot gentoo-bot closed this in ee2fbe2 Mar 3, 2024
@ajakk
Copy link
Member

ajakk commented Mar 3, 2024

Thanks. I'd prefer to avoid sniping at other projects/people in commit messages, though. No need for drama. Merged with 4130317..ee2fbe2

@rahilarious
Copy link
Contributor Author

Thanks. I'd prefer to avoid sniping at other projects/people in commit messages, though. No need for drama. Merged with 4130317..ee2fbe2

noted

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

Successfully merging this pull request may close these issues.

4 participants