In case you prefer a video, check below our YouTube video for this lab
Open Play with Docker
login with your docker hub account.
Task: Create a Dockerfile to create a docker image
vi Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install figlet
CMD ["figlet", "hello docker"]
Task: Build docker image with Dockerfile from previous step
docker image build -t imageformfile:0.1 .
Task: Run docker container with image build in previous step
docker container run imageformfile:0.1
Task: List all docker images on local system
docker image ls -a
Task: List all all changes made to docker image
Use image from previous step
docker image history <image ID>
Update you docker image with 0.2
vi Dockerfile
CMD ["figlet", "hello docker 0.2"]
TasK: Build docker image with updated Dockerfile from previous step
update tag to 0.2
docker image build -t imageformfile:0.2 .
Task: Run docker container with image build in previous step
docker container run imageformfile:0.2
Task: Delete all open nodes/instances and close session