🔭 addicted on Linux **
🌱 I’m currently learning Devops , Hacking
👯 I’m looking to collaborate on open Source projects
📝 I regularly write articles on https://twinsaitechie.blogspot.com/
📫 How to reach me krishnansai71@gmail.com
Github profile
https://github.com/krishnansai
Youtuber Twin Sai Tech
Monday, September 5, 2022
docker commands
con = container
Docker run con name ---- run the container
docker create con name --- create a con
docker start -a con name ---- to start a
docker system prune ---- to show the stop, build
docker ps --- current running container
docker ps -a --- all docker container
docker stop con name --- stop the container
docker kill con name --- kill the container
docker rm con name --- remove the container
docker images -- display all images
docker rmi con name ---remove the docker images
docker pull image name --- pull the docker image
docker exec con name --- execute the docker container
docker run con name --name (defult) --- to mentain
docker run -d con name --- run the con
docker attach name --- attach the docker id uniq
docker run -d con name sleep (sec) --- to
docker version --- to identify the version of the
docker run -p 8080:3456 con name -- port mapping
docker inspect con name --- display the details in
docker logs con name --- display the logs of
docker run img name: version --- to run the
docker build. --- build the docker images
docker build. -t image name --- build and mention
docker history con name ---- to see the history
cat /root/{app-name}/Dockerfile --- to see the image of the
docker run redis --- to run the server
docker exec -it con id redis-cli ---- to run
docker exec -it con name sh, bash, Powershell, zsh
docker commit -c 'CMD ["comment"]' con id ---- to
docker run -t -d -v /home/Krrish/Desktop/sampledir/:/var/www/html --name good day
WORKDIR /usr/app --- work dir app
docker-compose up -d ---- to start a multiple containers
docker-compose down ---- to stop a multiple containers
docker-compose up --build ---- to rebuild the container
restart type = no, always, on-failure, unless-stoped
docker build -f Dockerfile.dev . --- to build any
docker run -p 3000:3000 -v $(pwd):/app con name ----
docker run -p 3000:3000 -v /app/node_modeules -v $(pwd):/app con
network{
default bridge ---- default 172.17.0.1
custom bridge ---- 172.18.0.1 isolated
host ----- connect with host ip without define ports
macvlan ---- it also asign like a vm and
ipvlan --- connect with host and the macvlan
}
Subscribe to:
Post Comments (Atom)
Argocd with rollouts examples
examples in My github https://github.com/krishnansai/argocd-rollouts.git ArogoCd with ArgoRollouts Rollouts.yml # This example demonst...
-
docker run -p 6070:80 dorowu/ubuntu-desktop-lxde-vnc
-
What does it do :- This tool is used to help the automation of the Tor 9050 port number to open with the Localhost with the all container L...
No comments:
Post a Comment