moby: Unable to rm a directory in a container

root@host:/# docker run -i -t app/name bash
root@2ebaa716082f:/# rm -rf /app
root@2ebaa716082f:/# echo $?
0
root@2ebaa716082f:/# ls /app
Gemfile  Gemfile.lock  Procfile  README.rdoc  Rakefile  app  bin  chunk.html  config  config.ru  convert.sh  db  lib  log  public  test  tmp  vendor

The /app folder is owned by the image, it has not been added during the container life.

What could lead to such behavior ? I can’t see any error in logs. Any idea ?

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 22 (13 by maintainers)

Most upvoted comments

Docker 1.8.2, and am getting this same issue.

I can rm -r a directory I create from within the container, but not existing ones from the Dockerfile. I can rm files within these directories.

Note that I am trying to delete these directories from within the Dockerfile. It is a untar source -> build -> delete source pipleine