image

In this lab, we will be working with docker images, we modify docker image to suite our needs

In case you prefer a video, check below our YouTube video for this lab

Create docker hub account Docker Hub skip this step if you already have one

image

Open Play with Docker

image

login with your docker hub account

imageClick on start imageIt will start a 4 hr session image
click on + ADD NEW INSTANCE

imagecomment]: ![screenshot}}

Task: Run a docker container with image ubuntu and connect to to perform below command

apt-get update
apt-get install -y figlet
figlet "hello docker"
Solution
docker container run -it ubuntu bash
apt-get update
apt-get install -y figlet
figlet "hello docker"
exit

Task: List all docker containers on local system

Solution
docker container ls -a

Task: List and verify all change made to container

Solution
docker container diff <container ID>

Task: Create new docker image which include all changes you have made in previous step

Solution
docker container commit CONTAINER_ID

Task: List all docker images on local system

Solution
docker image ls -a

Task: Update name on docker image you created in previous steps

name firstimage
tag 1.0
Solution
docker image tag <IMAGE_ID> firstimage

Task: List all docker images on local system

Solution
docker image ls -a

Task: Run docker container with new image and command figlet hello

Solution
docker container run firstimage figlet hello

Delete all open nodes/instances and close session

  1. Select the node and click on DELETE
  2. Repeat same for any other open nodes
  3. click close session

cleanup}}


Click on ‘Submit Feedback’ on the bottom left of the page to submit any questions/feedback.