Example 1:
a) Clone the repo using below command:
b) Navigate to example1 directory:
c) Create a custom image with apache2 and custom page index.html
d) Spin up the container to run webapp
e) Go to browser and access the website at url - http://hostIP:8080
Example 2:
a) Navigate to example2 directory:
b) Create a custom image with figlet installed:
c) Run the container without any argument to see the banner:
Output:
| | | | | | | | _ | | | | __ |/ \ |/ |/ |/ / _ | |/|/|/|__/_/
d) Now pass an argument to overwite CMD content:
Output:
(| \ /_/ | | _ | | _ , | ||/ | || ||/ _/ _ (/_/ |/ / __/ |__/ / /| |
Example 3 :
a) Navigate to example3 directory:
b) Create a custom image to host flask application:
c) Spin up the container to run flask application:
d) Go to browser and access the app at url - http://hostIP:5000 & http://hostIP:5000/devops
Example 4 : Docker Compose Installation
a) Navigate to below directory :
b) Run the script install_compose.sh to install docker compose:
Example 5 : Install Wordpress using docker compose :
a) Navigate to directory :
b) Run the below command :
c) Access the wordpress at url : http://hostIP:8000
d) To clean up :