Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # additional packages
- sudo apt install ca-certificates apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- # add docker gpg key
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- # add to repository list
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- # update apt and install
- sudo apt-get update
- sudo apt-get install docker-ce docker-ce-cli containerd.io
- # enable docker debug
- echo '{"debug": true}' | sudo tee -a /etc/docker/daemon.json
- ####Reload Nginx################
- docker kill -s HUP n1
- ####Restart Nginx###############
- docker restart n1
- ####How to login using root user into docker container#######
- docker exec -it --workdir /root --user root f296ce6cf879 bash
- ###Downloading an image
- docker search mariadb
- docker pull mariadb:latest
- docker images
- ###List all exited containers
- docker ps -aq -f status=exited
- ###Remove stopped containers
- docker ps -aq --no-trunc -f status=exited | xargs docker rm
- ###
- ###Creating a container
- docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -d mariadb
- docker ps
- ###Running and stopping the container
- docker restart mariadbtest
- docker stop mariadbtest
- docker start mariadbtest
- docker stop --time=30 mariadbtest
- docker kill mariadbtest
- docker rm -v mariadbtest
- ###Removing All Unused Objects
- docker system prune
- ###Removing containers
- docker container rm cc3f2ff51cab cd20b396a061
- docker update --restart=no $(docker ps -a -q)
- ###Pausing containers
- docker pause node1 node2 node3
- docker unpause node1 node2 node3
- ###Troubleshooting a container
- docker logs mariadbtest
- docker inspect mariadbtest
- ###Accessing the container
- docker exec -it mariadbtest bash
- ###Deleting the images
- docker rmi mariadb
- #########################
- docker run --name n1 -p 192.168.241.17:8080:80 -d nginx
- docker run --name n2 -p 192.168.241.27:8888:80 -d nginx
- docker run -p 8080:80 -p 8443:443 bitnami/apache:latest
- #########################
- docker run --rm -it -p 80:80 vulnerables/web-dvwa
- docker pull feltsecure/owasp-bwapp
- docker run -d -p 80:80 feltsecure/owasp-bwapp [http://localhost/install.php]
- docker pull bkimminich/juice-shop
- docker run --rm -p 3000:3000 bkimminich/juice-shop
- docker run -p 8080:80 -it -d f5devcentral/f5-demo-app:latest
- #!/bin/bash
- yum update -y
- yum install -y docker
- service docker start
- docker pull bkimminich/juice-shop
- docker run -d -p 80:3000 bkimminich/juice-shop
- https://github.com/bsqrl/juice-shop-walkthrough
- https://incognitjoe.github.io/hacking-the-juice-shop.html
- https://www.fireeye.com/blog/threat-research/2018/04/establishing-a-baseline-for-remote-desktop-protocol.html
- http://www.hackingarticles.in/2-ways-use-msfvenom-payload-netcat/
- http://www.hackingarticles.in/network-packet-forensic-using-wireshark/
Add Comment
Please, Sign In to add comment