Skip to content

'docker commit' does not record deleted files #32

@shykes

Description

@shykes

What steps will reproduce the problem?

  $ C=$(docker run base:e9cb4ad9173245ac /bin/sh -c "echo hello > /foo")
  $ IMG_ADDED=$(docker commit $C _/tmp/testrm)
  $ C=$(docker run $IMG_ADDED /bin/rm /foo)
  $ IMG_REMOVED=$(docker commit $C _/tmp/testrm)
  $ docker run -a $IMG_REMOVED /bin/cat /foo

What is the expected output?

  /bin/cat: /foo: No such file or directory

What do you see instead?

  hello

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions