Docker Enn End
Docker Enn End
Now
Docker network inspect bridge
You kaka in kiran-net and default bridge
You can attach kaka3 and can also ping kaka because they are in same
bridge
Docker attach kaka3
Ping kaka
Storage Solutions:
1. Bind Mount
2. San
3. Persistent
4. Tmpfs
5. Cow
/etc/docker/daemon.json
Cowtest strategy:
1. mkdir cowtest
2. vi hello
Hello
3. chmod +x hello
4. vi dockerfile.base
FROM ubuntu:20.04
COPY . /app
5. vi dockerfile
FROM Koe/base-image:1.0
CMD /app/hello.sh
6. docker build -t Koe/base-image:1.0 -f dockerfile.base .
7. docker build -t Koe/final-image:1.0 -f dockerfile .
8. docker image ls
9. docker history imageid of baseimage
10.docker history imageid of finalimage
we can see finalimage on top.
Mkdir bind1
Echo bound > bind1/bond.txt
Cd bind1
Ll
We can see bond.txt file in bind1
Create file
Here we bounded the bind2 image with the bind1 then the files in bind1
also will be presented in bind2.
Mkdir /nfsdata
Vi /etc/exports
/nfsdata *(rw,no_root_squash)
Chown nobody:nogroup /nfsdata
Chmod 777 /nfsdata/
Systemctl restart nfs-kernel-server
Systemctl status nfs-kernel-server
Showmount -e localhost
We can see /nfsdata
Docker volume ls
Docker volume inspect nfsvolume
Docker Compose
Whenever we are going to run multiple containers we use docker compose
Create a vi docker-compose.yaml
Docker-compose -f docker-compose.yaml up
Docker File
Vi dockerfile
Docker build -t devapp:1.0(Eg)