Skip to content

Instantly share code, notes, and snippets.

@lowsky
Last active August 29, 2015 14:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lowsky/d5bcd0f99d94d75546a3 to your computer and use it in GitHub Desktop.
Save lowsky/d5bcd0f99d94d75546a3 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# This displays the log of the docker daemon in the boot2docker VM.
boot2docker ssh tail -f /var/log/docker.log
#!/bin/bash
# Cleans the docker daemon of all images that are not connected to any tagged image
docker images -aqf dangling=true | xargs docker rmi
#!/bin/bash
# dockerui is a simple web UI for controlling the docker daemon
#
# This is a simple helper script to pull the image and start a container
# accessing the local docker daemon (via UNIX socker)
#
# Expects port tcp/9000 to be unused.
#
docker inspect dockerui | grep -q "\"Running\": true" && {
echo Stopping running container...
docker stop dockerui
}
echo Checking for new version...
docker pull dockerui/dockerui | grep -q "Downloaded newer image" && {
echo New image version. Removing container...
docker rm dockerui
}
echo Starting dockerui...
docker start dockerui || docker run --name dockerui -d -v /var/run/docker.sock:/var/run/docker.sock -p 9000:9000 dockerui/dockerui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment