feat: initial docker installation support

Refs #1076
This commit is contained in:
Jose Diaz-Gonzalez
2019-05-13 03:05:50 -04:00
parent 6b42fde028
commit 3eb9c9b3ba
10 changed files with 172 additions and 0 deletions

19
docker/usr/local/bin/docker Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $TRACE ]] && set -x
main() {
declare desc="re-runs docker commands as sudo"
local DOCKER_BIN=""
if [[ -x "/usr/bin/docker" ]]; then
DOCKER_BIN="/usr/bin/docker"
fi
if [[ -z "$DOCKER_BIN" ]]; then
echo "! No docker binary found" 1>&2
exit 1
fi
sudo -E "$DOCKER_BIN" "$@"
}
main "$@"