-
Notifications
You must be signed in to change notification settings - Fork 24
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 multi-stage builds for Docker #8
Comments
Here is a Go application which returns the ip of the web caller. It is important to make image as small as possible. With this two stage Dockerfile, it is only 6mb for docker image:
Here is the Dockerfile
|
I'm also facing similar roadblock on my side, we need a multi-stage build for Packer to reduce the size of the image, what's the status of this current issue? |
I am going to piggyback this. Having a provisioner that can extract files from prebuilt images would be a good start. |
Hi, I am learning about packer these days (exactly because I have a project to build multiple images out of a template) and packer came in handy as an option for that. But now that I see the multi-stage build is not yet available, I think I will actually build a sample image with and without packer, see how big the difference is. I wish this could be prioritized somehow. |
This issue has been synced to JIRA for planning. JIRA ID: HPR-769 |
Any updates on this? We are considering the use of packer to improve the use of pipelines for building container images, but the fact that packer doesn't have multi-stage images support is really a stopper for this. |
Hi Folks. We are heavily using packer for our image builds. |
Perhaps something hacky around this[0] could be used?
[0] https://unix.stackexchange.com/questions/331645/extract-file-from-docker-image |
Sadly, after seeing no progress on this topic, we stopped using packer for container image build and switched to Containerfiles. 😔 |
I've been multi-stage building Windows container images with |
I have a proposed solution/extension to have this work.
You would probably need/want to support exported properties from the |
This issue was originally opened by @finferflu as hashicorp/packer#9462. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Please search the existing issues for relevant feature requests, and use the
reaction feature
(https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)
to add upvotes to pre-existing requests.
Feature Description
Add the ability to create multi-stage builds.
Use Case(s)
This is vital to keep the image sizes down, e.g. I have a Dockerfile which I can't translate to Packer:
The text was updated successfully, but these errors were encountered: