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
[Feature Request]: add UNION to Dockerfile syntax #29719
Comments
Starting from Docker 1.13, you can use
Does it satisfy your requirement? |
@AkihiroSuda great! But for my needs that's enough. Thank you. |
@thaJeztah thanks you for links. It was interesting to read. So I close this. |
@thaJeztah The Dockerfile syntax was frozen, but you "unfroze" it in 0725045. So is this feature under consideration now? |
i would like to have same syntax like in a bash file (so i can copy and paste the content): RUN BEGIN
apt-get update
apt-get dist-upgrade --no-install-recommends -y
END or RUN {
apt-get update
apt-get dist-upgrade --no-install-recommends -y
} |
Those following this issue may be interested in #34423 |
To reduce the number of layers, combining technique used commands through the operator "&&".
But this operator can not be combined arbitrary commands, only the commands in RUN.
I propose to introduce a new unit construction in Dockerfile syntax, which allows to combine several commands in one commit.
For example:
Instead
RUN apt-get update && \ apt-get dist-upgrade --no-install-recommends -y
You can write
But such a structure in the current syntax in general is impossible:
The text was updated successfully, but these errors were encountered: