search

Home  >  Q&A  >  body text

dockerfile - docker container中postfix进程开机启动后container退出

最近写了个简单的flask_mailapi的dockerfile,如下:

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软件.

只要执行docker run -d mail_api就会退出,但是docker run -it mail_api /bin/bash的时候就不会出现退出.求大家帮忙看看.

PHP中文网PHP中文网2777 days ago706

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-22 08:57:57

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

    reply
    0
  • Cancelreply