Open raunak-r opened 4 years ago
Helped me to know that it was the docker container that was talking all my space so i push all my container to my docker registry then did sudo rm -rf /var/lib/docker/ it cleared up my space :) hope it helps someone :)
> sudo rm -rf /var/lib/docker/
> sudo service docker restart
sudo docker rmi $(sudo docker images -q) -f
sudo docker system prune
BUILD --- sudo docker build --network=host -t ImageName . --- sudo docker build --network=host -t imageName -f ./filepath/dockerfile .
RUN --- sudo docker run -d --network=host ImageName --- sudo docker run -d --network=host -e environment='' --log-opt max-size=10m imageName
RUNNING --- sudo docker ps -q
STOP --- sudo docker stop CID --- sudo docker stop $(sudo docker ps -q)
BASH --- sudo docker exec -it CID /bin/bash --- sudo docker exec -it $(sudo docker ps -q) /bin/bash # to access the bash of a running container. --- sudo docker run -it --entrypoint /bin/bash IMAGENAME # to run an image as a bash container._
LOGS --- sudo docker logs CID --follow --- sudo docker logs $(sudo docker ps -q) --follow # when there is only image running.
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer And point your browser to http://localhost:9000.
. -d arg to run container in background. . see running images, stopping containers. . network equal host mode to access local ips. . putting env variables in dockerfile. . connecting to local psql from docker instance
> user nobody nogroup;
https://serverfault.com/a/901176
> Use sudo nginx -t to test the complete configuration file, which starts at nginx.conf and pulls in additional fragments using the include directive. See this document for more.
/etc/nginx/
> sudo nginx -t -c /etc/nginx/nginx.conf
# logs
> /usr/local/var/log/nginx/*
> tail -f /var/log/nginx/error.log
> tail -f /var/log/nginx/access.log /var/log/nginx/error.log
# angular routing
> https://stackoverflow.com/questions/35038155/how-to-redirect-all-angular-request-to-index-html-in-nginx
GIT
https://betterprogramming.pub/git-commands-that-i-use-almost-on-daily-basis-33fbef3c5f62
https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
https://about.gitlab.com/blog/2018/06/07/keeping-git-commit-history-clean/
On undoing, fixing, or removing commits in git
Fixing SSL ERRORS git - github: server certificate verification failed - Stack Overflow
Setting up GIT server on EC2 https://stackoverflow.com/a/13150263/8110072 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
[] https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
Reducing Clone Time
Setting up SSH