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: Mount volume when run docker build #17745
Comments
Take a look at #7115. I think this is a cleaner solution to your end goal. |
Looks great Proposal. |
Thanks for your tips. |
Is it possible to reopen this request? Now it's late 2016 already, the linked issue is from 2014 and still open, and adding This would greatly speed up building an docker image from existing host files, especially when the host files are huge. During |
I can't control whether it's open or closed. But I think you'll find you get a lot of resistance to a Personally I'm also for not putting in hacks or temporary solutions just because the ideal solution hasn't been implemented yet. If the feature is added it should be because it has merit on its own. But I'm not associated with the docker project, so just consider me part of the peanut gallery. |
Yes, but it's really useful when you want to expose something like .ssh/id_rsa without ever writing to disk during a sequence of build dependencies. |
@thaJeztah dupe of #14080 ? |
@graingert yes it is, sorry, should've added that 👍 |
In my case, where this would be useful would be on Debian systems: mounting Or another scenario, you're doing a build, but it also produces test reports such as failure listings and code coverage reports that you don't need to ship with the image, but are useful artefacts to have around. These could be written to a volume when a CI server goes to build the image for the CI server to pick up and host. Or tonight, I'm doing some Gentoo-based images for myself, I'd like to mount Adding those smarts is a trivial So lots of reasons why this is a worthwhile proposal, and I'm doubtful that the nested builds proposed in #7115 is going to help in the above instances. |
@sjlongland this issue is currently closed because it's a duplicate of #14080 please move your comment over there. |
please comment on #14080 instead |
Yes, let's lock this issue to prevent the discussion from diverging |
We now using Docker build to compile our project and then delivery the result executable binary to small docker container, we need new feature, mount volume when run docker build
Build binary
After build finish, will generate two file , one executable binary, and one configure file
Make production light weight container image
example production Dockerfile
and we can run docker build again to generate a light weight container images container the must have files to run an instance with docker
The text was updated successfully, but these errors were encountered: