Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (29.3k points)

I got an error when I tried to set up a docker container using a docker file. My container is not starting up. Refer to the attached screenshot for your reference. Please help me with this issue.

1 Answer

0 votes
by (50.2k points)

You need to build the docker file and then only you will get the container. You are trying to run the previously stopped container. 

For building:

sudo docker build /home/ubuntu/devops/docker/apache/. -t <username>/bild

sudo docker run -it -p 82:80 -d <username>/build

This will run the container then you can use exec command to enter that container.

For more information, check out this Docker Tutorial

Browse Categories