Docker Community Forums

Share and learn in the Docker community.

Failed to create a Docker image: touch: /opt/.wh..wh..opq: Operation not permitted

build
docker

(Eric725) #1

Hi All,

I want to create a Docker image which contains a opaque whiteout file (.wh…wh…opq), I was trying to do it with this Dockerfile:
FROM alpine:3.4
RUN mkdir /opt
&& touch /opt/foo
&& touch /opt/bar
&& touch /opt/.wh…wh…opq

But it failed:
$ docker build -t test .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM alpine:3.4
—> ebd1ddee9c22
Step 2 : RUN mkdir /opt && touch /opt/foo && touch /opt/bar && touch /opt/.wh…wh…opq
—> Running in d3937c84e33b
touch: /opt/.wh…wh…opq: Operation not permitted
The command ‘/bin/sh -c mkdir /opt && touch /opt/foo && touch /opt/bar && touch /opt/.wh…wh…opq’ returned a non-zero code: 1

Any ideas? Thanks!