Postfix process in docker container exits after startup.

  docker, question

Recently wrote a simpleflask_mailApi dockerfile, as follows:

FROM python2.7.8
 MAINTAINER rockywu
 ADD . /app
 WORKDIR /app
 RUN pip install -r requirements.txt
 ENTRYPOINT ["/etc/init.d/postfix","start"]
 EXPOSE 5000
 EXPOSE 25

Postfix software is already installed in the base image.

Just do itdocker run -d mail_apiWill quit, butdocker run -it mail_api /bin/bashIf you don’t, you won’t quit. Please help me.

Try adding a “-P” parameter to the former. Is the default entry point not running, so it is launched