I have a small Gunicorn
service. This is my Dockerfile
for it:
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"]
The problem is I can't hold the container as the active process. I run it so: docker run --name pypypy -td -p 8187:8081 pytest
.
What do I do wrong ? I read some posts at stackoverflow. But it doesn't work for me and I don't know why.