Skip to content
This repository has been archived by the owner. It is now read-only.

"Error relabeling merged directory: operation not supported" when building docker inside docker #1301

Hartimer opened this issue May 25, 2016 · 5 comments


Copy link

@Hartimer Hartimer commented May 25, 2016

I came across this error and I'm not sure how to fix it.

For the record, the faulty commit seems to be coreos/docker@8acee1b and I was pointed there by moby/moby#22548.

I'm trying to build a docker image from within a docker container to which I mounted the host's docker binay and socket.

We're using:

PRETTY_NAME="CoreOS 1010.3.0 (MoreOS)"

and Docker version 1.10.3, build 8acee1b

Similar to what the user described on the linked issue, this is what I'm getting:

> docker build --rm -t myimage:mytag .
Sending build context to Docker daemon 24.58 kB
Step 1 : FROM baseimage
 ---> 63e9b759074e
Step 2 : MAINTAINER <me>
 ---> Using cache
 ---> 13fcbeec8eab
Step 3 : RUN mkdir -p /home/jenkins-slave
 ---> Running in 1acfaece4e8a
Error relabeling merged directory: operation not supported

The parameter -p is irrelevant, I get the same error with or without it. Any advice?

Copy link

@mischief mischief commented May 26, 2016

cc @mjg59

Copy link

@mjg59 mjg59 commented May 26, 2016

Hm. I'm going to need to look at the behaviour of upstream Docker in this case - when running inside a confined selinux context, we don't want Docker to attempt to change to a new context.

Copy link

@DerekTBrown DerekTBrown commented Jun 13, 2016

I was receiving the same error trying to build a modified Alpine docker image in CoreOS v1010.5.0 running inside Vagrant/Virtualbox. which seems to indicate it is not a Docker-inside-Docker container problem. I was able to solve the error by running the docker build command using sudo.

Copy link

@derDieDasJojo derDieDasJojo commented Jun 15, 2016

I got this error when i mixed up pulling from docker hub automated build and self build images.
removing old images solved the problem for me: docker rmi $(docker images -q)

update: also got the error when i was trying to build an image with label "latest" but still had an container running using the same imagename with the label "latest" so i had to docker stop _containername_
and then it worked again.

Copy link

@crawford crawford commented Jun 15, 2016

Fixed by coreos/coreos-overlay#2006.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.