Skip to content

Instantly share code, notes, and snippets.

@lahirudx
Last active April 29, 2019 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lahirudx/4a52bbed6fa6a65957a0d3b22f476a76 to your computer and use it in GitHub Desktop.
Save lahirudx/4a52bbed6fa6a65957a0d3b22f476a76 to your computer and use it in GitHub Desktop.
My Cheat Sheet

#--Ubuntu -Increasing the amount of inotify watchers (Permanent).. >> echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p -Increasing the amount of inotify watchers (Temporary).. >> sudo sysctl fs.inotify.max_user_watches=524288 && sudo sysctl -p -Get current inotify file watch limit.. >> cat /proc/sys/fs/inotify/max_user_watches

#--Docker

  • docker container run -p{--publish} 8000:80

  • docker container run -p 8000:80 -d{--detach} --name

  • docker container run -it bash

  • docker container exec -it bash

  • docker container ls -a

  • docker container logs <name||id>

  • docker container top <name||id>

  • docker container inspect <name||id>

  • docker container stats

  • docker container rm -f{--force} <containerIds...>

  • docker container port <name||id>

  • docker network ls

  • docker network inspect

  • docker network create

  • docker network connect

  • docker network disconnect

  • docker image ls

  • docker image inspect

  • docker pull

  • docker rm -vf $(docker ps -a -q) # To delete all containers including its volumes

  • docker rmi -f $(docker images -a -q) # To delete all the images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment