Last active
August 29, 2015 14:21
-
-
Save lowsky/d5bcd0f99d94d75546a3 to your computer and use it in GitHub Desktop.
Docker scripts from https://github.com/xperimental/docker-scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# This displays the log of the docker daemon in the boot2docker VM. | |
boot2docker ssh tail -f /var/log/docker.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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