DEV Community

calteen
calteen

Posted on

DevOps Notes

1.Installin docker

sudo apt-get install docker-engine
apt install docker.io
sudo service docker start






sudo docker run nginx
Enter fullscreen mode Exit fullscreen mode
  1. docker run nginx
  2. docker run -p 80:80 nginx 4.machineport: docker ka port 5.to bandh karne par docker container bandh ho ja raha hai

docker run -d -p 8080:80 nginx
6.kon kon se container chal rahe hai
doker ps

  1. maan lo mai stop karna chahta hu
    docker stop 527a82
    8.docker ps -a
    history dekhne ke liye

  2. kaise naya port assesable kare:
    ufw allow 5000

10.sirf 4 likhne se bhi stop ho jayega: aagar koi aur nahi hai to:
11.docker rm a0
12.docker system prune

  1. docker rum -f 7fa3da8a : forcefully stop kar dena> container chal raha hai stop mat karo... chal raha hai: then forceflly stop it
  2. docker exec -it 1f12 bash
  3. apt.... vim harrybhai.txt exit
  4. docker commit 1f12
  5. docker images 18 docker commit 1f12 harry/nginx 19 commit karne se faida kya hua vahi ki aab maine container delete kar diya, and mere paas sirf image bacha hai, and kaise bhi mai usko replicate kar sakta hu aab

Image description
https://dockerlabs.collabnix.com/

Top comments (0)