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

docker build read from stdin needs documentation #3538

Closed
thaJeztah opened this issue Jun 8, 2017 · 3 comments
Closed

docker build read from stdin needs documentation #3538

thaJeztah opened this issue Jun 8, 2017 · 3 comments
Assignees
Labels
area/build Relates to Dockerfiles or docker build command area/engine Issue affects Docker engine/daemon lifecycle/locked

Comments

@thaJeztah
Copy link
Member

Problem description

Docker 17.05 added an option to perform docker build with the Dockerfile piped through stdin, but being able to use local (or remote) build-context. Prior to docker 17.05, building an image with a Dockerfile from stdin did not send the build-context.

Docker < 17.05;

docker build -t foo -<<EOF
FROM busybox
RUN echo "hello world"
EOF

Docker 17.05 and up;

docker build -t . -f-<<EOF
FROM busybox
RUN echo "hello world"
COPY . /my-copied-files
EOF

or (remote build-context);

docker build -t foo https://github.com/thajeztah/pgadmin4-docker.git -f-<<EOF
FROM busybox
COPY LICENSE config_local.py /usr/local/lib/python2.7/site-packages/pgadmin4/
EOF

(or other variations to get the Dockerfile from stdin)

The old syntax is still supported; the new one is just added

This functionality wasn't documented when the pull request was merged, so needs an update (probably both in CLI reference and other pages)

/cc @dsheets @tonistiigi @mstanleyjones

Related pull request: moby/moby#31236
And proposal: moby/moby#27393

@thaJeztah thaJeztah added the area/engine Issue affects Docker engine/daemon label Jun 8, 2017
@thaJeztah thaJeztah added this to the engine/17.05 milestone Jun 8, 2017
@mdlinville mdlinville self-assigned this Jul 24, 2017
@amontalban
Copy link

Would love to have this documented, found this googling around and it's a cool feature that should be known. Thanks for being awesome guys!

encodeering added a commit to encodeering/docker-base that referenced this issue Jan 12, 2018
* eliminates file creation. directory doesn't contain any further context information

NOTE

* https://docs.docker.com/engine/reference/commandline/build/#build-with--
* docker/docs#3538
@mdlinville mdlinville removed their assignment Feb 2, 2018
@mdlinville
Copy link

@thaJeztah Sorry I didn't get to this. You might want to tackle this in docker/cli instead of here.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/build Relates to Dockerfiles or docker build command area/engine Issue affects Docker engine/daemon lifecycle/locked
Projects
None yet
Development

No branches or pull requests

6 participants