Docker Community Forums

Share and learn in the Docker community.

Error Supervisor: A Process Control System

error Supervisor: A Process Control System — http://supervisord.org/
I have tested in Docker in Linux [ubuntu studio 20.04], and in macOS Catalina but getting errors…

in Docker in Linux [ubuntu studio 20.04]

error after 714 command
713 docker build -t supervised .
714 docker run -p 9000:80 --name supervised supervised

====

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

Error: File contains parsing errors: /etc/supervisord.conf

	[line 172]: '    nodaemon=true\r\n'

	[line 175]: '    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"\r\n'

	[line 179]: '    command=service start tomcat\r\n'

	[line 180]: '    redirect_stderr=true\r\n'

	[line 181]: '    stdout_logfile=/var/log/tomcat/supervisor.log\r\n'

	[line 182]: '    stderr_logfile=/var/log/tomcat/supervisor.error_log'

For help, use /usr/local/bin/supervisord -h

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat /etc/supervisord.conf

cat: /etc/supervisord.conf: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat /etc/supervisord.conf

cat: /etc/supervisord.conf: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

docker: Error response from daemon: Conflict. The container name "/supervised" is already in use by container "f18007580126d0493ad487f02d4da9b5eacf349b74e1da575b5c87e55c6f3081". You have to remove (or rename) that container to be able to reuse that name.

See 'docker run --help'.

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

docker: Error response from daemon: Conflict. The container name "/supervised" is already in use by container "f18007580126d0493ad487f02d4da9b5eacf349b74e1da575b5c87e55c6f3081". You have to remove (or rename) that container to be able to reuse that name.

See 'docker run --help'.

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised2 supervised

Error: File contains parsing errors: /etc/supervisord.conf

	[line 172]: '    nodaemon=true\r\n'

	[line 175]: '    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"\r\n'

	[line 179]: '    command=service start tomcat\r\n'

	[line 180]: '    redirect_stderr=true\r\n'

	[line 181]: '    stdout_logfile=/var/log/tomcat/supervisor.log\r\n'

	[line 182]: '    stderr_logfile=/var/log/tomcat/supervisor.error_log'

For help, use /usr/local/bin/supervisord -h

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ /usr/local/bin/supervisord -h

bash: /usr/local/bin/supervisord: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cd /usr/local/bin/supervisord

bash: cd: /usr/local/bin/supervisord: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cd /usr/local/bin/

leonidas@ubuntu:/usr/local/bin$ ls

leonidas@ubuntu:/usr/local/bin$ ls -al

total 8

drwxr-xr-x  2 root root 4096 Apr 23  2020 .

drwxr-xr-x 10 root root 4096 Apr 23  2020 ..

leonidas@ubuntu:/usr/local/bin$ cd -

/home/leonidas/Documents/docker-in-practise/t14

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ ls

Dockerfile  info-cmd.txt  supervisord_add.conf

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat Dockerfile 

FROM ubuntu:14.04

    ENV DEBIAN_FRONTEND noninteractive

    RUN apt-get update && apt-get install -y python-pip apache2 tomcat7

    RUN pip install supervisor

    RUN mkdir -p /var/lock/apache2

    RUN mkdir -p /var/run/apache2

    RUN mkdir -p /var/log/tomcat

    RUN echo_supervisord_conf > /etc/supervisord.conf

    ADD ./supervisord_add.conf /tmp/supervisord_add.conf

    RUN cat /tmp/supervisord_add.conf >> /etc/supervisord.conf

    RUN rm /tmp/supervisord_add.conf

    CMD ["supervisord","-c","/etc/supervisord.conf"]leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat Do

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat supervisord_add.conf 

[supervisord]

    nodaemon=true

# apache

[program:apache2]

    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"



# tomcat

[program:tomcat]

    command=service start tomcat

    redirect_stderr=true

    stdout_logfile=/var/log/tomcat/supervisor.lSuccessfully built 1ca62d8c4cea

Successfully tagged supervised:latest

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

Error: File contains parsing errors: /etc/supervisord.conf

	[line 172]: '    nodaemon=true\r\n'

	[line 175]: '    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"\r\n'

	[line 179]: '    command=service start tomcat\r\n'

	[line 180]: '    redirect_stderr=true\r\n'

	[line 181]: '    stdout_logfile=/var/log/tomcat/supervisor.log\r\n'

	[line 182]: '    stderr_logfile=/var/log/tomcat/supervisor.error_log'

For help, use /usr/local/bin/supervisord -h

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat /etc/supervisord.conf

cat: /etc/supervisord.conf: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat /etc/supervisord.conf

cat: /etc/supervisord.conf: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

docker: Error response from daemon: Conflict. The container name "/supervised" is already in use by container "f18007580126d0493ad487f02d4da9b5eacf349b74e1da575b5c87e55c6f3081". You have to remove (or rename) that container to be able to reuse that name.

See 'docker run --help'.

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised supervised

docker: Error response from daemon: Conflict. The container name "/supervised" is already in use by container "f18007580126d0493ad487f02d4da9b5eacf349b74e1da575b5c87e55c6f3081". You have to remove (or rename) that container to be able to reuse that name.

See 'docker run --help'.

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ docker run -p 9000:80 --name supervised2 supervised

Error: File contains parsing errors: /etc/supervisord.conf

	[line 172]: '    nodaemon=true\r\n'

	[line 175]: '    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"\r\n'

	[line 179]: '    command=service start tomcat\r\n'

	[line 180]: '    redirect_stderr=true\r\n'

	[line 181]: '    stdout_logfile=/var/log/tomcat/supervisor.log\r\n'

	[line 182]: '    stderr_logfile=/var/log/tomcat/supervisor.error_log'

For help, use /usr/local/bin/supervisord -h

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ /usr/local/bin/supervisord -h

bash: /usr/local/bin/supervisord: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cd /usr/local/bin/supervisord

bash: cd: /usr/local/bin/supervisord: No such file or directory

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cd /usr/local/bin/

leonidas@ubuntu:/usr/local/bin$ ls

leonidas@ubuntu:/usr/local/bin$ ls -al

total 8

drwxr-xr-x  2 root root 4096 Apr 23  2020 .

drwxr-xr-x 10 root root 4096 Apr 23  2020 ..

leonidas@ubuntu:/usr/local/bin$ cd -

/home/leonidas/Documents/docker-in-practise/t14

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ ls

Dockerfile  info-cmd.txt  supervisord_add.conf

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat Dockerfile 

FROM ubuntu:14.04

    ENV DEBIAN_FRONTEND noninteractive

    RUN apt-get update && apt-get install -y python-pip apache2 tomcat7

    RUN pip install supervisor

    RUN mkdir -p /var/lock/apache2

    RUN mkdir -p /var/run/apache2

    RUN mkdir -p /var/log/tomcat

    RUN echo_supervisord_conf > /etc/supervisord.conf

    ADD ./supervisord_add.conf /tmp/supervisord_add.conf

    RUN cat /tmp/supervisord_add.conf >> /etc/supervisord.conf

    RUN rm /tmp/supervisord_add.conf

    CMD ["supervisord","-c","/etc/supervisord.conf"]

    

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat Do

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ cat supervisord_add.conf 

[supervisord]

    nodaemon=true

# apache

[program:apache2]

    command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"



# tomcat

[program:tomcat]

    command=service start tomcat

    redirect_stderr=true

    stdout_logfile=/var/log/tomcat/supervisor.log

    stderr_logfile=/var/log/tomcat/supervisor.error_log

    

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ ls

Dockerfile  info-cmd.txt  supervisord_add.conf



leonidas@ubuntu:~/Documents/docker-in-practise/t14$ history 25

  705  docker exec -ti 628283005d17 /bin/sh

  706  curl 172.17.0.2:80

  707  exit

  708  minikube dashboard

  709  minikube start

  710  minikube dashboard

  711  EXIT

  712  exit

  713  docker build -t supervised .

  714  docker run -p 9000:80 --name supervised supervised

  715  cat /etc/supervisord.conf

  716  docker run -p 9000:80 --name supervised supervised

  717  docker run -p 9000:80 --name supervised2 supervised

  718  /usr/local/bin/supervisord -h

  719  cd /usr/local/bin/supervisord

  720  cd /usr/local/bin/

  721  ls

  722  ls -al

  723  cd -

  724  ls

  725  cat Dockerfile 

  726  cat supervisord_add.conf 

  727  ls

  728  history 15

  729  history 25

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 



leonidas@ubuntu:~/Documents/docker-in-practise/t14$ 



[program:tomcat]

    command=service start tomcat

    redirect_stderr=true

    stdout_logfile=/var/log/tomcat/supervisor.log

    stderr_logfile=/var/log/tomcat/supervisor.error_logleonidas@ubuntu:~/Documents/docker-in-practise/t14$ ls

Dockerfile  info-cmd.txt  supervisord_add.conf

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ history 15

  714  docker run -p 9000:80 --name supervised supervised

  715  cat /etc/supervisord.conf

  716  docker run -p 9000:80 --name supervised supervised

  717  docker run -p 9000:80 --name supervised2 supervised

  718  /usr/local/bin/supervisord -h

  719  cd /usr/local/bin/supervisord

  720  cd /usr/local/bin/

  721  ls

  722  ls -al

  723  cd -

  724  ls

  725  cat Dockerfile 

  726  cat supervisord_add.conf 

  727  ls

  728  history 15

leonidas@ubuntu:~/Documents/docker-in-practise/t14$ history 25

  705  docker exec -ti 628283005d17 /bin/sh

  706  curl 172.17.0.2:80

  707  exit

  708  minikube dashboard

  709  minikube start

  710  minikube dashboard

  711  EXIT

  712  exit

  713  docker build -t supervised .

  714  docker run -p 9000:80 --name supervised supervised

  715  cat /etc/supervisord.conf

  716  docker run -p 9000:80 --name supervised supervised

  717  docker run -p 9000:80 --name supervised2 supervised

  718  /usr/local/bin/supervisord -h

  719  cd /usr/local/bin/supervisord

  720  cd /usr/local/bin/

  721  ls

  722  ls -al

  723  cd -

  724  ls

  725  cat Dockerfile 

  726  cat supervisord_add.conf 

  727  ls

  728  history 15

  729  history 25

leonidas@ubuntu:~/Documents/docker-in-practise/t14$