Docker EXEC Operations Kodekloud



 

Question:


 

Solution:

Log in to mentioned app server in the question

ssh [email protected]

Find the docker container

sudo docker ps

Enter inside the docker container

docker exec -it kkloud /bin/bash

Install the apache2 and update the configuration according to mention ports and hostname

apt install apache2 -y

sed -i 's/Listen 80/Listen 3001/g' ports.conf

sed -i 's/:80/:3001/g' apache2.conf

sed -i 's/#ServerName www.example.com/ServerName localhost/g' apache2.conf

Restart and check the status of apache

service apache2 start

service apache2 enable

service apache2 status

 





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

1 comments:

  1. cd /etc/apache2

    sed -i 's/Listen 80/Listen 3001/g' ports.conf

    sed -i 's/:80/:3001/g' apache2.conf

    sed -i 's/#ServerName www.example.com/ServerName localhost/g' apache2.conf

    ReplyDelete