0% found this document useful (0 votes)
10 views9 pages

(CC - 23) Lab 7

Uploaded by

salemaymen814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views9 pages

(CC - 23) Lab 7

Uploaded by

salemaymen814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Cloud Computing

Lab 7
Agenda

• Build Images with Dockerfile


• Demo
• Hands-On
Running application inside container workflow

Application Docker Image Docker Container

Build Run
Dockerfile
Demo: Solution
Hands-on
Hands-On: Manage Multiple Containers
• Run a nginx, a mysql, and a httpd (apache) server
• Run all of them --detach (or -d), name them with --name
• nginx should listen on 80:80, httpd on 8080:80, mysql on
3306:3306
• When running mysql, use the --env option (or -e) to pass in
MYSQL_RANDOM_ROOT_PASSWORD=yes
• Use docker container logs on mysql to find the random
password it created on startup
• Clean it all up with docker container stop and docker
container rm (both can accept multiple names or ID's)
• Use docker container ls to ensure everything is correct
before
Hands-On: Build Docker Image with Python Application

• Create a simple Python File, in the directory python-


application, with name PythonExample.py containing
the following content:

• Create an image using Dockerfile method that contains


that app.
• Start a container to run that app.
Thank You

You might also like