summaryrefslogtreecommitdiffstats
path: root/build/buildah-remote.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-11 05:29:12 +0100
committerSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-11 05:29:12 +0100
commitb363c63d44eef05a06f8f7ff7c471ac4392cc4e9 (patch)
treebc95b45f56aed16e3ed005e01a762dad29fad205 /build/buildah-remote.sh
parent28190b6d4664508ad8b1cf88a82378b02f487cfa (diff)
downloadccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.gz
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.bz2
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.xz
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.zip
Support for ufo & jupyter notebooks
Diffstat (limited to 'build/buildah-remote.sh')
-rw-r--r--build/buildah-remote.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/buildah-remote.sh b/build/buildah-remote.sh
new file mode 100644
index 0000000..1016d19
--- /dev/null
+++ b/build/buildah-remote.sh
@@ -0,0 +1,20 @@
+#! /usr/bin/env bash
+
+set -o errexit
+
+image="$1"
+[ -n "$image" ] || { echo "Usage: $0 <astra|ccpi|ufo|tomo|imageX>"; exit 1; }
+
+container=$(buildah from ${image}:latest)
+buildah config --port 2222/tcp --port 8888/tcp $container
+
+buildah run $container sh -c "echo '$(id -ng):x:$(id -g):' >> /etc/group"
+#buildah run $container sh -c "echo '$(id -nu):x:$(id -u):$(id -g):$(id -nu):/ccpi/data:/bin/bash' >> /etc/passwd"
+buildah run $container sh -c "echo '$(id -nu):x:0:0:$(id -nu):/ccpi/data:/bin/bash' >> /etc/passwd"
+
+buildah run $container sh -c 'service ssh start'
+buildah run $container sh -c "echo '$(id -nu):test' | chpasswd"
+
+buildah commit --format docker $container ${image}-remote:latest
+
+echo "$container build from ${image} and saved as ${image}-remote"