Docker undo rm container

I accidentally removed my container with “docker rm [CONTAINER_ID]”.

Is there anyway that I can undo this, or restore the data in the container?

  • How to implement CPU & memory docker container restrictions on GCE + MYSQL backup/restore?
  • How to speed up an Azure web application deployment with lots of files?
  • How to send application logs from docker to cloudwatch
  • How to connect Docker Swarm to multiple consul servers for failover?
  • Docker run -d <private image> gives fatal. On other hosts it's ok?
  • How do I connect a docker container to ssh forward Xserver on the host?
  • It was a CentOS image.

    $docker info
    Containers: 1
    Images: 30
    Server Version: 1.9.1
    Storage Driver: devicemapper
     Pool Name: docker-202:16-1179651-pool
     Pool Blocksize: 65.54 kB
     Base Device Size: 107.4 GB
     Backing Filesystem:
     Data file: /dev/loop0
     Metadata file: /dev/loop1
     Data Space Used: 8.998 GB
     Data Space Total: 107.4 GB
     Data Space Available: 43.66 GB
     Metadata Space Used: 11.45 MB
     Metadata Space Total: 2.147 GB
     Metadata Space Available: 2.136 GB
     Udev Sync Supported: true
     Deferred Removal Enabled: false
     Deferred Deletion Enabled: false
     Deferred Deleted Device Count: 0
     Data loop file: /srv/docker/devicemapper/devicemapper/data
     Metadata loop file: /srv/docker/devicemapper/devicemapper/metadata
     Library Version: 1.02.93-RHEL7 (2015-01-28)
    Execution Driver: native-0.2
    Logging Driver: json-file
    Kernel Version: 4.1.17-22.30.amzn1.x86_64
    Operating System: Amazon Linux AMI 2016.03
    CPUs: 2
    Total Memory: 3.862 GiB
    Name: ip-172-31-14-126
    Username: hogehoge

    Similar question:
    how to retrieve volume from a removed Docker container?

    The above question is asking how to retrieve data from a “data volume
    container”, but my one was not. I stored everything inside the CentOS

  • Managing and Utilizing Multiple Docker Containers (Microservices) in a Single Server
  • PID mapping between docker and host
  • Multi-node Hadoop cluster with Docker
  • Can't install pip packages inside a docker container with Ubuntu
  • How to make my docker run on a specified linux kernel version?
  • Automate adding new repository tags to Docker Registry Automated Build
  • One Solution collect form web for “Docker undo rm container”

    The answer is probably no.

    According to the comment I received from docker forum:

    docker rm is just like rm on the host, there is no going back

    Personal story:
    I lost 3 weeks of my business data, and having big trouble with it.
    Good lesson to teach myself that never “rm” unless you are 100% sure what you are doing, and backup your data!

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.