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

Add support for docker --squash #6510

Closed
kiorky opened this issue Feb 6, 2019 · 3 comments
Closed

Add support for docker --squash #6510

kiorky opened this issue Feb 6, 2019 · 3 comments

Comments

@kiorky
Copy link

kiorky commented Feb 6, 2019

Reopening of #4235, feel free to close and reopen the other.

Is your feature request related to a problem? Please describe.
squash is often needed to handle base image builds, see moby/moby#38657 and the long list of --squash related bugs on moby tracker. A lot of us rely on it.

It would be nice to have a supported toggle in compose to enable the flag.

@mskoenz
Copy link

mskoenz commented Oct 31, 2020

I mention my comment in #4235 here too, since this is an open issue. At least to my search, many propose to just use multistage builds to compensate for the lack of squash, but the issue is that it does not seem possible to inherit CMD/ENTRYPOINT/USER/WORKDIR from the parent image we are multistage-"squashing" (or I did not find the way to do it). A docker-compose build --squash option would be extremely helpful to make e.g. gitlab CI pipelines more efficient since pulling only a few layers seems to be faster due to less validation (and also the output is less cluttered with many hundered lines of docker pull output).

As a naive proposal:

...
    my_service:
        build:
            - squash: true #or 1 or whatever is the best yml const

Thx for all your work, docker-compose is awesome!

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale
Copy link

stale bot commented Apr 27, 2022

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Apr 27, 2022
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