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

feature request: docker build interactive #1669

Closed
senthilnayagam opened this issue Aug 26, 2013 · 5 comments
Closed

feature request: docker build interactive #1669

senthilnayagam opened this issue Aug 26, 2013 · 5 comments

Comments

@senthilnayagam
Copy link

when building with docker build, occasionally builds fail and the image is not saved

common problems while writing Dockerfile include, missing dependencies, config changes, new package paths

currently what I do is check all the images and run the image in bash and correct it and then commit the image

there can be a interactive version of build where if interactive mode is on, if the build fails it goes into the bash console and that line can be fixed and subsequent commands can be run

something like
sudo docker build -t="projectname" . -i -t /bin/bash

@crosbymichael
Copy link
Contributor

I think a simple sudo docker build -t . that allows stdin would help a lot when building images. Django admin anyone?

@Thermionix
Copy link
Contributor

currently trying to write a dockerfile for postfix+dovecot & being able to input the hostname would make life good

@jpetazzo
Copy link
Contributor

In that specific case, I would suggest to hard-code a placeholder hostname (e.g. @@HOSTNAME@@); then, when starting the container, you would actually start a wrapper script, which would find the real hostname from the environment (with the -e option to docker run), and use sed or rpl to change @@HOSTNAME@@ to the value of the environment variable.

Would that work for you?

@Thermionix
Copy link
Contributor

I'm thinking mostly for sharing dockerfiles https://raw.github.com/Thermionix/Dockerfiles/master/mail-stack-delivery/Dockerfile

@crosbymichael
Copy link
Contributor

Actually with the new trusted builds and different builds systems for Dockerfiles we do not want stdin because it can produce an inconsistent result. Every time you run docker build you want the same result to be produced. Variables and stdin for the build process is not something that we want.

If you want to discuss alternatives to a specific issue please join IRC or post on the user mailing list. You may find more help there.

trebonian pushed a commit to trebonian/docker that referenced this issue Jun 3, 2021
Lock linux namespace structure when adding neighbors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants