40/100 Docker EXEC Operations
One of the Nautilus DevOps team members was working to configure services on a kkloud
container that is running on App Server 1
in Stratos Datacenter
. Due to some personal work he is on PTO for the rest of the week, but we need to finish his pending work ASAP. Please complete the remaining work as per details given below:
a. Install apache2
in kkloud
container using apt
that is running on App Server 1
in Stratos Datacenter
.
b. Configure Apache to listen on port 8084
instead of default http
port. Do not bind it to listen on specific IP or hostname only, i.e it should listen on localhost, 127.0.0.1, container ip, etc.
c. Make sure Apache service is up and running inside the container. Keep the container in running state at the end.
ssh tony@stapp01
[tony@stapp01 ~]$ docker exec -it kkloud /bin/bash
root@752c4a5cb9b6:/#
root@752c4a5cb9b6:/# apt install apache2 -y
# Install nano or vi to modify the port
root@752c4a5cb9b6:/# apt install nano apt -y
root@752c4a5cb9b6:/# nano /etc/apache2/ports.conf
# Change Listen 80 to Listen 8084 and save the file
Listen 8084
root@752c4a5cb9b6:/# service apache2 restart
root@752c4a5cb9b6:/# service apache2 status
* apache2 is running
exit