moby: Permissions problem on Docker 1.8 when reading from stdin
In my build scripts I have a line like so:
tar c --mtime=2014-01-01 --exclude=__pycache__ --exclude=Dockerfile.template --mode="g=u,o=rX" --owner=root --group=root . | docker build --tag=$IMAGE_NAME:$BUILD_NUMBER -
It does work on Docker < 1.8 but on 1.8 it now throws:
unable to prepare context: unable to extract stdin to temporary context direcotry: lchown /tmp/docker-build-context-183505935/run_entrypoints.sh: operation not permitted
I can change it to use sudo:
tar c --mtime=2014-01-01 --exclude=__pycache__ --exclude=*.pyc --exclude=Dockerfile.template --mode="g=u,o=rX" . | sudo docker build --tag=$IMAGE_NAME:$BUILD_NUMBER -
and then it works, but I wonder if it’s a bug or some change that affects permissions/users.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 49 (28 by maintainers)
Commits related to this issue
- Skip test of builder examples when docker version is not 1.7 Bug in docker cli version 1.8 and 1.9 that restrict users from sending docker context through stdin https://github.com/docker/docker/issue... — committed to tomologic/wrench by loa 9 years ago
- work around for docker/docker#15785 — committed to mdn/kuma by mostlygeek 9 years ago
- Avoid extracting to temp directory on building from tar Fixes #15785 Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> — committed to tonistiigi/docker by tonistiigi 8 years ago
- Avoid extracting to temp directory on building from tar Fixes #15785 Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> — committed to aditirajagopal/docker by tonistiigi 8 years ago
- Removed workaround for stdin problem on Docker 1.8 - Docker 1.10 fixed bug https://github.com/docker/docker/issues/15785 — committed to lidel/meowkov by lidel 8 years ago
- Explicitly note that Docker 1.10+ is required for the new Bashbrew This is especially thanks to https://github.com/docker/docker/issues/15785 and thus https://github.com/docker/docker/commit/c8cc4fb8... — committed to infosiftr/stackbrew by tianon 8 years ago
- Explicitly note that Docker 1.10+ is required for the new Bashbrew This is especially thanks to https://github.com/docker/docker/issues/15785 and thus https://github.com/docker/docker/commit/c8cc4fb8... — committed to docker-library/bashbrew by tianon 8 years ago
- Explicitly note that Docker 1.10+ is required for the new Bashbrew This is especially thanks to https://github.com/docker/docker/issues/15785 and thus https://github.com/docker/docker/commit/c8cc4fb8... — committed to docker-library/bashbrew by tianon 8 years ago
Having to do the kinds of gymnastics @lidel describes in his https://github.com/docker/docker/issues/15785#issuecomment-164030356 for a regression that has been identified since August does not seem reasonable, especially where the source of the problem appears to have been identified (see this https://github.com/docker/docker/pull/14546#issuecomment-148571518). Will a fix still be included in the next release? This appears to be frustrating
docker build -
builds on several CI platforms.