Lab 3 – Docker – 3 July 2023
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
==========================================================================
How to create an Image
-----------------------------------
====================================
- Existing contr - ub + git + apache
- Using Dockerfile
What is an Image?
- collection of filesystem
- ROOT FS --> -> APP FS -> APP FS -> APP FS == Layers
FROM ubuntu
MAINTAINER Rajesh Kumar
RUN apt-get update
RUN apt-get install git -y
RUN apt-get install apache2 -y
658 docker run -itd ubuntu
659 docker ps
660 docker exec -it cd8c8e108d93 /bin/bash
661 docker ps
667 docker exec cd8c8e108d93 git
668 clear
669 ls
670 docker ps
671 docker commit -m"up-up-git-ap" -a"Rajesh Kumar" cd8c8e108d93 up-up-git-ap
672 docker images
673 clear
674 ls
675 vi dockerfile
676 docker build -t raju .
677 clear
678 vi dockerfile
679 docker build -t raju .
680 docker images