Created
December 1, 2015 16:28
-
-
Save rasschaert/d3ce180a8245b14bb73a to your computer and use it in GitHub Desktop.
Wrapper script that starts and stops dockerui container
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 | |
if [[ -z $1 ]]; then | |
echo "Usage: $(basename $0) start|stop" >&2 | |
exit 1 | |
fi | |
if [[ $1 == "start" ]]; then | |
echo "starting container" | |
docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock --name dockerui dockerui/dockerui | |
echo "dockerui is now listening on localhost:9000" | |
elif [[ $1 == "stop" ]]; then | |
echo "killing container" | |
docker kill dockerui 2>/dev/null | |
echo "removing container" | |
docker rm dockerui 2>/dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment