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