IssueRaiser

build time only -v / --volume option

As suggested by @cpuguy83 in https://github.com/docker/docker/issues/3156 here is the use case for a flexible -v option at build time. When building a Docker image I need to install a database and an app. It's all wrapped up in two tarballs: 1 for the DB and 1 for the App that needs to be installed in it (schema, objects, static data, credentials etc.). The whole solution is then run via a shell script that handles several shell variables and tune OS credentials and other things accordingly. When I explode the above tarball (or use the Dockerfile ADD directive) the whole thing bloats up to about 1.5GB(!). Not ideal as you can immagine. I would like to have this '-v /distrib/ready2installApp:/distrib' directive still possible (as it is today in the Dockerfile) but ## I would like to disassociate the declarative build process (infrastructure as code) from the container run-time deployable artifact. I do not want to have to deal with the dead weight of 1.5GB that I do not need. Could we have an --unmount-volume option that I can run at the end of the Dockerfile? or Given how Volume works right now in a Dockerfile, maybe we need a new Dockerfile directive for a temporary volume that people use while installing? I think the Puppet example supplied by @fatherlinux was on a similar line... or Whatever you guys can think of. The objective is avoiding to have to carry around all that dead weight that is useless for a deployed App or Service. However that dead weight is necessary @

Posted by zrml on Jun 21, 2015, 9:41 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.6,000 issues0 comments

onboarding (SaaS)

build time only -v / --volume option

zrmlJun 21, 2015, 9:41 PM

As suggested by @cpuguy83 in https://github.com/docker/docker/issues/3156 here is the use case for a flexible -v option at build time. When building a Docker image I need to install a database and an app. It's all wrapped up in two tarballs: 1 for the DB and 1 for the App that needs to be installed in it (schema, objects, static data, credentials etc.). The whole solution is then run via a shell script that handles several shell variables and tune OS credentials and other things accordingly. When I explode the above tarball (or use the Dockerfile ADD directive) the whole thing bloats up to about 1.5GB(!). Not ideal as you can immagine. I would like to have this '-v /distrib/ready2installApp:/distrib' directive still possible (as it is today in the Dockerfile) but ## I would like to disassociate the declarative build process (infrastructure as code) from the container run-time deployable artifact. I do not want to have to deal with the dead weight of 1.5GB that I do not need. Could we have an --unmount-volume option that I can run at the end of the Dockerfile? or Given how Volume works right now in a Dockerfile, maybe we need a new Dockerfile directive for a temporary volume that people use while installing? I think the Puppet example supplied by @fatherlinux was on a similar line... or Whatever you guys can think of. The objective is avoiding to have to carry around all that dead weight that is useless for a deployed App or Service. However that dead weight is necessary @

Comments (0)

No comments yet. Start the discussion.

Comment on this issue