Skip to content

Instantly share code, notes, and snippets.

View mohan08p's full-sized avatar

Mohan Pawar mohan08p

View GitHub Profile
@mohan08p
mohan08p / docker-compose.yml
Created August 1, 2020 07:22
Simple Wordpress App using Docker Compose
version: '3'
services:
db:
container_name: wp-mysql
image: mysql:5.7
volumes:
- $PWD/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 12345678
@mohan08p
mohan08p / simple_deployment.yaml
Created May 10, 2020 07:19
Simple Nginx deployment in Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
minReadySeconds: 5
template:
@mohan08p
mohan08p / RmvConImgNetVol.md
Last active March 6, 2017 06:27
How to remove unused Docker containers and images

Till now (docker version 1.12) we are using the following command to delete all the running containers(also, if we want to delete the volumes, we can do that manually using it's respective tag -v in the following command),

Delete all Exited Containers

docker rm $(docker ps -q -f status=exited)

Delete all Stopped Containers

docker rm $(docker ps -a -q)