aboutsummaryrefslogtreecommitdiff
path: root/scripts/docker-install.bash
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/docker-install.bash')
-rwxr-xr-xscripts/docker-install.bash37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/docker-install.bash b/scripts/docker-install.bash
new file mode 100755
index 0000000..779ebbf
--- /dev/null
+++ b/scripts/docker-install.bash
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+if (( $# != 1 )); then
+ echo "usage: docker-install.bash UID" >&2
+ exit 1
+fi
+
+uid="$1"
+
+packages="
+
+# needed to run build system
+make
+
+# needed for 'make help'
+bsdmainutils
+
+# for checking diffs if you want
+git
+
+# just in case we want root
+sudo
+
+"
+
+export DEBIAN_FRONTEND=noninteractive
+apt-get update
+apt-get install -y $(grep -v "^#" <<< "$packages")
+rm -rf /var/lib/apt/lists/*
+
+useradd --uid="$uid" --create-home --groups sudo docker
+passwd -d docker
+
+rm "$0"