Skip to content

Permissions problem on Docker 1.8 when reading from stdin #15785

@riklaunim

Description

@riklaunim

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.

Metadata

Metadata

Assignees

Labels

area/security/trustkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions