0
我有一个小的Gunicorn
服务。这是我Dockerfile
吧:守护进程启动后停靠码头停止
FROM ubuntu:16.04
RUN apt-get clean && apt-get update && apt-get install -y locales
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8 LC_MESSAGES=POSIX
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y python-pip \
&& mkdir /app
ADD . app
WORKDIR /app
RUN pip install -r requirements.txt
CMD ["/usr/local/bin/gunicorn", "--config", "/app/gunicorn.py", "myrun:app", "&&", "tail", "-f", "/dev/null"]
问题是我不能保持容器作为活动过程。我这样运行:docker run --name pypypy -td -p 8187:8081 pytest
。
我该怎么做?我在计算器上阅读some posts。但它不适用于我,我不知道为什么。
容器输出是什么? – whites11
@ whites11只是一个带ID的字符串。类似于“bc95a716f2309b1ff0624af28efce442eb89e0c21e88202a1059f8bd4b0a3762”。 – faoxis
是的,那是容器ID。尝试运行没有“-d”标志的图像来获得标准输出 – whites11