Docker Volume Day-33 to 35
Day-33 Docker Volume
Create a dockerfile
Dockerfile content
Create a image using dockerfile
verify
Create a container using myimg
See created volume data
Update
Change dir
Install vim
Create a file
inside content
ls
Share this volume in new container;
come out container
create a new container using existing container volume
ls see data volume created
ls now myfile found in data; Now it works
create a one file
verify
exit
let start mycontainer1
inside a container
now testfile found in mycont1
Create a new container with volume
ls; see sai volume is created
create one file in inside sai volume
now create a new container mycont4
see volume sai available in mycont4
See inside sai volume is samplefile found
create one file rajfile; let us check same found in mycont3 also
rajfile found in mycont3 also
Now delete rajfile
now same rajfile not found in mycont4 also; let me check
Volume Map from Host to Container
See the /home/ec2-user directory files
create container and create volume then map between /home/ec2-user and raj; now whatever files found in home location same found in raj volume also
one file is created name harifile
harifile found in /home/ec2-user directory also
create one more container name devopscont and share volume saidemycont container
same rajfile contens found in devopscont container
create a one file rahulfile
see rahulfile found in base machine
Day-34
Port Mapping or Port Expose
create a web container
Check container run or not
Check port no
login container
update
install apache2
create one file
start apache2
Check status
site is working
See docker images
create a container
see the running container
working
same ip with port no 80 is working hello webpage (65.0.106.178:80); ip with port 8080 is working jenkins page 65.0.106.178:8080 this is called port mapping or port expose
Day-35 Docker HUB
See Docker images
login docker hub
create a reserved face
Push image
See the dockerhub
Now create a another one instance
install docker
start docker
enable docker
status docker
pull the image
see the image
create a container
See the container
See the image
delete above container and image
remove container
Remove image
Now make image as private then pull
Access denied
login docker
now pull the image its working