Question

Running Dockerfile with CMD supervisor in App Platform

I have a project with a Dockerfile that roughly has the following:

FROM php:7.2-apache

# supervisor installation &&
# create directory for child images to store configuration in
RUN apt-get -y install supervisor && \
  mkdir -p /var/log/supervisor && \
  mkdir -p /etc/supervisor/conf.d

# supervisor configurations
ADD /.docker/conf/supervisor/conf.d/apache.conf /etc/supervisor/conf.d/apache.conf
ADD /.docker/conf/supervisor/conf.d/Emails.conf /etc/supervisor/conf.d/Emails.conf

# Docker will start only supervisord
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisor.conf"]

apache.conf is supervisor keeping apache alive and Emails.conf is Laravel’ s queue:work command kept alive.

However my app in App Platform fails with:

2021-12-03T10:31:17.440161328Z Unlinking stale socket /var/run/supervisor.sock 2021-12-03T10:31:17.741289162Z Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord. 2021-12-03T10:31:17.741327485Z For help, use /usr/bin/supervisord -h

The error occurs only in App Platform, Docker builds the container OK.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there, try debugging the code, it has some silly errors. Thank you.