I’m having trouble getting a very simple image to run. It’s a Twisted server. Here’s the Dockerfile:
FROM python:2.7 RUN pip install --upgrade pip RUN easy_install pyapns RUN pip install service_identity RUN pip install python-epoll EXPOSE 7077 CMD ["twistd", "-r", "epoll", "web", "--class=pyapns.server.APNSServer", "--port=7077"] ENTRYPOINT ["/bin/sh", "-c"]
When I run it, the output is the twisted usage info, as if I had not specified the class to run, etc.
If I comment out the CMD statement and set the ENTRYPOINT to bash, if I enter the following line, it runs fine. (Note: I added the -n option simply so I can see the output. I’ve tried the above with it and it doesn’t change anything)
twistd -n -r epoll --class=pyapns.server.APNSServer --port=7077
What am I doing wrong?