Run a Docker Container Kodekloud

 

Question: Nautilus DevOps team is testing some applications deployment on some of the application servers. They need to deploy a nginx container on Application Server 2. Please complete the task as per details given below:

    On Application Server 2 create a container named nginx_2 using image nginx with alpine tag and make sure container is in running state.

Solution: 

Login to Application server 2 according to question

ssh [email protected]

Login as root

sudo su

Then run the docker container according to question

docker run -d --name=nginx_2 -p 8080:80 nginx:alpine

Check docker container

docker ps

Verify the service

curl http://localhost:8080




Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment