Please do not ignore this, I have tried to go through the other solutions proposed on the forum and none solved my problem.
I am kick-starting with Docker and the DevOps stuff. Started with the basic get-started tutorial on their page. I am unable to run the application as described in the tuto,
$ docker --version
Docker version 17.06.0-ce, build 02c1d87
I am running docker on Ubuntu 16.04 LTS
, the following are the different verifications i did
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
friendlyhello latest cb003cf9993a 6 minutes ago 194MB
python 2.7-slim 451c85955bc2 7 days ago 182MB
hello-world latest 1815c82652c0 6 weeks ago 1.84kB
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d094e902b93 friendlyhello "python app.py" 7 minutes ago Exited (0) 7 minutes ago awesome_fermi
9d358777b84d hello-world "/hello" 3 hours ago Exited (0) 3 hours ago eloquent_euclid
I noticed that actually when i run an application, the Status
is Exited
as shown above.
$ Curl http://localhost:4000
curl: (7) Failed to connect to localhost port 4000: Connection refused
The content of the Dockerfile
is show below:
FROM python:2.7-slim
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
EXPOSE 80
ENV NAME World
CMD ["python", "app.py"]