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

let's expand the joined CMD lines (e.g. stop doing CMD1 && CMD2…) #419

Closed
jmtd opened this issue Mar 5, 2019 · 4 comments
Closed

let's expand the joined CMD lines (e.g. stop doing CMD1 && CMD2…) #419

jmtd opened this issue Mar 5, 2019 · 4 comments

Comments

@jmtd
Copy link
Collaborator

jmtd commented Mar 5, 2019

In the template, we do things like e.g.

{{ pkg_manager }} --setopt=tsflags=nodocs install -y {%- for package in packages %} {{ package }}{% endfor %} \
&& rpm -q{% for package in packages %} {{ package }}{% endfor %}

This was originally to reduce the amount of layers in our images, but we do not need to do that anymore since we can use more sophisticated build systems that don't result in excessive layers, and/or squashing.

But compressing things like this does make debugging issues harder because it's not always clear which part of the chain may have failed when something doesn't work. This has been a minor issue for a long time but I've just hit it fresh so I thought i'd finally raise an issue to discuss it.

@goldmann
Copy link
Contributor

goldmann commented Mar 5, 2019

Generally speaking, the templating mechanism needs to be reviewed since it introduces some issues like hardcoded license or issues with extending it. It is also very complex (see #407).

Your issue seems to be a valid one, although fairly low priority. We have been using it since ages, it speeds up a little bit the build process, but I don't see any reason we couldn't drop chaining of commands.

@rnc
Copy link
Contributor

rnc commented Nov 25, 2021

Note also #593 for the 'layers' comment

@goldmann
Copy link
Contributor

Considering that this ticket could potentially create more layers and having the feeling that users got used to the way it is rendered I'm tempted to close this ticket without a code change. Would that be ok with you, Jon?

@jmtd
Copy link
Collaborator Author

jmtd commented Nov 30, 2021

Hi! I guess we're used to it now. I haven't hit a problem with the chained commands for a while. I'll close.

@jmtd jmtd closed this as completed Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants