Hi folks. I’m just trying to get started with Docker, and am following the Get Started guide. All is well on steps 1 and 2, and I get the sample page nice and fast.
As soon as I get to Step 3 though, where I start the containers up from a service with 5 replicas, the request to localhost takes 20 seconds. It does then return successfully, but always takes 20 seconds, plus a few ms.
I have tried with different numbers of replicas with the same result, and I even tried spinning up the service on labs.play-with-docker.com and I got the same problem.
This is my docker-compose.yml:
version: "3"
services:
web:
image: cylindric/get-started:part2
deploy:
replicas: 1
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition: on-failure
ports:
- "80:80"
networks:
- webnet
networks:
webnet:
And the actual container Dockerfile is:
FROM python:2.7-slim
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
EXPOSE 80
ENV NAME World
CMD ["python", "app.py"]
Obviously as I am just on step 3 off the first tutorial, I’m not really very well equipped to troubleshoot this problem.