Docker images are supposed to be immutable, yet when I import one of my images on another machine, it behaves differently.To reproduce the bug, I will start from a debian-wheezy image built using debootstrap.I build my image using a Dockerfile:FROM debian-wheezyRUN apt-get install -y fail2banRUN rm /var/run/fail2ban/fail2ban.sockThe last command avoids fail2ban from crashing at next start: for some reason, the socket file stays there after installing fail2ban, even if I stop the service manually in the Dockerfile. Fail2ban can not restart if the file is still there.Launching the image and starting fail2ban will succeed. We can check the content of the /var/run/fail2ban repository:$ docker build -t test/fail2ban .$ docker run test/fail2ban ls /var/run/fail2banfail2ban.pidHowever, if I export the image and import it to another machine:$ docker save test/fail2ban > /tmp/fail2ban.tar$ scp /tmp/fail2ban.tar user@machine:/tmp$ ssh user@machine cat /tmp/fail2ban.tar | docker load$ ssh user@machine docker run test/fail2ban ls /var/run/fail2banfail2ban.pidfail2ban.sockThis time the socket file is there, preventing me from starting the service.Can somebody explain this behaviour and how to fix the problem?Here are some more informations:$ uname -aLinux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux$ docker --versionDocker version 1.6.0, build 4749651$ ssh user@machine uname -aLinux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU/Linux$ ssh user@machine docker --versionDocker version 1.6.0, build 4749651
inconsistent Docker image
docker;fail2ban