docker container won't start because an existing pid file

sebelk picture sebelk · Feb 22, 2015 · Viewed 24.3k times · Source

When I start a docker container it fails because an existing pid file:

[root@newhope sergio]# docker logs sharp_shockley 
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running
httpd (pid 1) already running

How can I remove such a file, because I don't find it.

[root@newhope sergio]# docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8/1.4.1
OS/Arch (client): linux/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8/1.4.1

[root@newhope sergio]# find / -name "httpd.pid"
find: ‘/run/user/1000/gvfs’: Permiso denegado

Answer

styonsk picture styonsk · May 31, 2016

Try:

docker-compose down

To destroy any environments that are already running.