pramodtripathi/apache2
Ubuntu Image with Apache installed on it.
27
Steps need to be perform:
Pull image in to your system and Do following steps:
$ sudo docker pull pramodtripathi/apache2
1.$ sudo docker run -it -d -p 81:80 pramodtripathi/apache2
Will create an container for apache server.here -it flag is use to make it interactive ,-d flag is use to to run in background,-p is used for port forwarding.
81:80 is Hostport : Internal Port where apache server is running.By default apache run in 80 Port.
2.$ sudo docker ps
lists the running apache server images.
3.$ sudo docker exec -it container_name bash
Will open cmd for container_name where you can perform operations.
4.$ sudo docker exec -it container_name bash root@container_name:/# service apache2 status
Will start apache server.
5.Now you can access server by going to browser and typing Host_ip:81
docker pull pramodtripathi/apache2