PREREQUISITES:
Install Docker Desktop on your laptops.
- MAC: Install Docker for Mac
- WINDOWS: Install Docker for Windows
- Linux: Install Docker for Linux
Main Lab:
EX1: In order to run our lab you have 2 options:
-
OPTION1:
- Open Docker Desktop.
- Run the following command:
docker run -p 8501:8501 --name lab_container hiba25/lab6_image_1 - Open http://localhost:8501 in a browser.
-
OPTION2:
- Create a new folder.
- Download the docker image file lab6_image_1.tar in that folder.
- Open Docker Desktop.
- Load the image using:
docker load -i lab6_image_1.tar - Run the container:
docker run -p 8501:8501 --name lab_container lab6_image_1 - Open http://localhost:8501 in a browser.
-
To stop the container:
docker stop lab_container -
To build new image after changing the code:
docker build -f Dockerfile1 -t image_name . docker run -p 8501:8501 --name lab_container image_name -
EX2: In order to run our lab you have 2 options:
-
OPTION1:
-
Open Docker Desktop.
-
Run the container on a different port:
docker run -p 8502:8501 --name lab_container hiba25/lab6_image_2 -
Open http://localhost:8502 in a browser.
-
OPTION2:
-
Create a new folder.
- Download the docker image file lab6_image_2.tar in that folder.
-
Open Docker Desktop.
-
Load the image:
docker load -i lab6_image_2.tar -
Run the container:
docker run -p 8502:8501 --name lab_container lab6_image_2 -
Open http://localhost:8502 in a browser.