PostgreSQL -- run Supervisord on Ubuntu in Docker

Source: Internet
Author: User
I tried to use the supervisor to start nginx and PostgreSQL ON THE dockercontainer boot. Use the following Dockerfile and supervisord. conf files. The above application starts, but stops after a moment. What's wrong? There is no error message in the stderr or system log file. Dockerfile: 1. [Code] [text] FROMUbuntu: 14.04 RUNmkdir

I tried to use the supervisor to start nginx and PostgreSQL on the docker container boot. Use the following Dockerfile and supervisord. conf files. The above application starts, but stops after a moment. What's wrong? There is no error message in the stderr or system log file.
Dockerfile:

1. [Code] [text]

FROM Ubuntu: 14.04
RUN mkdir-p/var/www/var/pgsql/data/var/log/pgsql/var/log/nginx
COPY supervisord. conf/etc/supervisor/conf. d/supervisord. conf
COPY nginx. conf/etc/nginx/sites-enabled/default
RUN apt-get-y update & apt-get-y upgrade
RUN apt-get-y install curl wget supervisor postgresql-contrib libpq-dev llvm gcc g ++ python3-pip python2.7 pytho
N2.7-dev python-pip git nginx nodejs openjdk-7-jdk build-essential
RUN apt-get-y clean all
EXPOSE 80 8000 8080
CMD ["/usr/bin/supervisord"]

Supervisord. conf:

2. [Code] [text]

[Supervisord]
Nodaemon = true

[Program: nginx]
Command =/bin/bash-c "exec/usr/sbin/nginx-DFOREGROUND"
Stdout_logfile =/var/log/nginx/% (program_name) s. log
Stderr_logfile =/var/log/nginx/% (program_name) s. log

[Program: postgresql]
Command =/bin/bash-c "exec/usr/lib/postgresql/9.3/bin/s-D/var/pgsql/data"
Stdout_logfile =/var/log/pgsql/% (program_name) s. log
Stderr_logfile =/var/log/pgsql/% (program_name) s. log

-------------------------------------- Solution --------------------------------------------

You should:
Use the-n option to run supervisord on the foreground.
Use ENTRYPOINT in Dockerfile instead of CMD.

------------------------------------ Lili split line ------------------------------------

Install PostgreSQL 6.3 http://www.linuxidc.com/Linux/2014-05/101787.htm in CentOS 9.3 environment yum

PostgreSQL cache detail http://www.linuxidc.com/Linux/2013-07/87778.htm

Windows platform compiling PostgreSQL http://www.linuxidc.com/Linux/2013-05/85114.htm

Configuration and installation http://www.linuxidc.com/Linux/2013-04/83564.htm of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure the http://www.linuxidc.com/Linux/2011-08/40520.htm for phppgAdmin on Ubuntu

Install PostgreSQL9.3 http://www.linuxidc.com/Linux/2014-05/101723.htm on CentOS Platform

PostgreSQL configure Streaming Replication cluster http://www.linuxidc.com/Linux/2014-05/101724.htm

How to install PostgreSQL 7/6 and phpPgAdmin in CentOS 5/6. 4Http://www.linuxidc.com/Linux/2014-12/110108.htm

------------------------------------ Lili split line ------------------------------------

PostgreSQL details: Click here
PostgreSQLOf: Click here

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/126173.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.