Skip to content

Instantly share code, notes, and snippets.

@boysbee
boysbee / clean-docker-for-mac.sh
Created April 5, 2017 08:21
Clean docker for mac
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
#!/bin/sh
docker volume rm $(docker volume ls -qf dangling=true)
@boysbee
boysbee / rabbitmq.sh
Created December 22, 2016 16:28
Run docker with RabbitMQ and management plugin and set user , password default.
#!/bin/sh
docker run -d --hostname my-rabbit --name rabbit-local -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=p@ssw0rd -p 8080:15672 rabbitmq:3-management
@boysbee
boysbee / HelloWorld.scala
Created May 8, 2014 18:01
hello world with scala
object HelloWorld {
def main(args: Array[String]) = println("Hello World!")
}