I am trying to pack a django project into docker environment.
My docker file looks like
FROM python:2.7
EXPOSE 8000
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
COPY code /code
WORKDIR /code
ENTRYPOINT ./manage.py runserver 0.0.0.0:8000
requirements.txt
Django==1.10.6
Everything works fine but id don't see any output from django server. If I am attaching to container then I can see its output.
But when I am trying to call
docker logs -f "containerid"
I receive nothing
Try starting the container with the -t flag. In other words add the -t flag to the docker run command
-t, --tty Allocates a pseudo-TTY
Update: docker service update -t service_name , note this cmd has to target a manager node.
When you run docker service create you can include -t flag. The parameters are the same between create and update.