I have build my small Python(flask ) app.Container is here docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4146fd976547 identidock_identidock:latest "/cmd.sh" 5 minutes ago Up 5 minutes 9090/tcp, 9191/tcp agitated_leakey
If I try
curl localhost:5000
curl: (7) Failed to connect to localhost port 5000: Connection refused
I have checked sudo netstat -an | grep -E "5000" unix 3 [ ] STREAM CONNECTED 25000
It is not listeting on 5000. yaml line with ports
ports:
- "5000:5000"
If I exec my container
docker exec -it agitated_leakey /bin/bash
uwsgi@4146fd976547:/app$ netstat -ln
bash: netstat: command not found
My Dockerfile
RUN pip install Flask==0.10.1 uWSGI==2.0.8
WORKDIR /app
COPY app /app
COPY cmd.sh /
EXPOSE 9090 9191
Why this happens?