Unable to launch docker container
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
OS: Ubuntu 16.04
I'm trying to run a docker container through a docker image that has been created through a dockerfile. Below is the content of my Dockerfile:-
"FROM centos:latest
MAINTAINER Hacked you@yourdomain.com
RUN yum -y install httpd
COPY index.html /var/www/html/
CMD [âÂÂ/usr/sbin/httpdâÂÂ, âÂÂ-DâÂÂ, âÂÂFOREGROUNDâÂÂ]
EXPOSE 80"
This is the procedure I follow:-
- Create a dockerfile in the '/home/ubuntu' directory
- Add the above content inside the dockerfile
Create a file (index.html) and add a basic html code.
Build an image out of this dockerfile.
5.Run
Docker images
- Create a container from the docker image we have just created:
- So, as you can see the Container has been created but if I do a 'docker ps', It does not display the container.
So, I did docker ps -a and it shows the container but the status is exited. please refer the below screenshot:-
- As a last step, I try this:-
http://"ipofmyserver":1234/
But it does not display anything. It shows connection refused.
I want to know what is wrong with this procedure.
Thanks.
ubuntu docker container
add a comment |Â
up vote
0
down vote
favorite
OS: Ubuntu 16.04
I'm trying to run a docker container through a docker image that has been created through a dockerfile. Below is the content of my Dockerfile:-
"FROM centos:latest
MAINTAINER Hacked you@yourdomain.com
RUN yum -y install httpd
COPY index.html /var/www/html/
CMD [âÂÂ/usr/sbin/httpdâÂÂ, âÂÂ-DâÂÂ, âÂÂFOREGROUNDâÂÂ]
EXPOSE 80"
This is the procedure I follow:-
- Create a dockerfile in the '/home/ubuntu' directory
- Add the above content inside the dockerfile
Create a file (index.html) and add a basic html code.
Build an image out of this dockerfile.
5.Run
Docker images
- Create a container from the docker image we have just created:
- So, as you can see the Container has been created but if I do a 'docker ps', It does not display the container.
So, I did docker ps -a and it shows the container but the status is exited. please refer the below screenshot:-
- As a last step, I try this:-
http://"ipofmyserver":1234/
But it does not display anything. It shows connection refused.
I want to know what is wrong with this procedure.
Thanks.
ubuntu docker container
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
OS: Ubuntu 16.04
I'm trying to run a docker container through a docker image that has been created through a dockerfile. Below is the content of my Dockerfile:-
"FROM centos:latest
MAINTAINER Hacked you@yourdomain.com
RUN yum -y install httpd
COPY index.html /var/www/html/
CMD [âÂÂ/usr/sbin/httpdâÂÂ, âÂÂ-DâÂÂ, âÂÂFOREGROUNDâÂÂ]
EXPOSE 80"
This is the procedure I follow:-
- Create a dockerfile in the '/home/ubuntu' directory
- Add the above content inside the dockerfile
Create a file (index.html) and add a basic html code.
Build an image out of this dockerfile.
5.Run
Docker images
- Create a container from the docker image we have just created:
- So, as you can see the Container has been created but if I do a 'docker ps', It does not display the container.
So, I did docker ps -a and it shows the container but the status is exited. please refer the below screenshot:-
- As a last step, I try this:-
http://"ipofmyserver":1234/
But it does not display anything. It shows connection refused.
I want to know what is wrong with this procedure.
Thanks.
ubuntu docker container
OS: Ubuntu 16.04
I'm trying to run a docker container through a docker image that has been created through a dockerfile. Below is the content of my Dockerfile:-
"FROM centos:latest
MAINTAINER Hacked you@yourdomain.com
RUN yum -y install httpd
COPY index.html /var/www/html/
CMD [âÂÂ/usr/sbin/httpdâÂÂ, âÂÂ-DâÂÂ, âÂÂFOREGROUNDâÂÂ]
EXPOSE 80"
This is the procedure I follow:-
- Create a dockerfile in the '/home/ubuntu' directory
- Add the above content inside the dockerfile
Create a file (index.html) and add a basic html code.
Build an image out of this dockerfile.
5.Run
Docker images
- Create a container from the docker image we have just created:
- So, as you can see the Container has been created but if I do a 'docker ps', It does not display the container.
So, I did docker ps -a and it shows the container but the status is exited. please refer the below screenshot:-
- As a last step, I try this:-
http://"ipofmyserver":1234/
But it does not display anything. It shows connection refused.
I want to know what is wrong with this procedure.
Thanks.
ubuntu docker container
ubuntu docker container
asked 2 mins ago
hacked
12
12
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475953%2funable-to-launch-docker-container%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password