Skip to content

Instantly share code, notes, and snippets.

@rasschaert
Created December 1, 2015 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rasschaert/d3ce180a8245b14bb73a to your computer and use it in GitHub Desktop.
Save rasschaert/d3ce180a8245b14bb73a to your computer and use it in GitHub Desktop.
Wrapper script that starts and stops dockerui container
#!/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