summaryrefslogtreecommitdiffstats
path: root/build/buildah-ccpi.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-09 20:16:44 +0100
committerSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-09 20:16:44 +0100
commit28190b6d4664508ad8b1cf88a82378b02f487cfa (patch)
tree8bb6f21b9feb1013f67a4c1a147c95c4ff976fc4 /build/buildah-ccpi.sh
parent8fb3c0a3f96024786305a1234fe5cfb70e6f00c0 (diff)
downloadccpi-28190b6d4664508ad8b1cf88a82378b02f487cfa.tar.gz
ccpi-28190b6d4664508ad8b1cf88a82378b02f487cfa.tar.bz2
ccpi-28190b6d4664508ad8b1cf88a82378b02f487cfa.tar.xz
ccpi-28190b6d4664508ad8b1cf88a82378b02f487cfa.zip
Support ssh server for remote debugging
Diffstat (limited to 'build/buildah-ccpi.sh')
-rw-r--r--build/buildah-ccpi.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/build/buildah-ccpi.sh b/build/buildah-ccpi.sh
new file mode 100644
index 0000000..1bc6b10
--- /dev/null
+++ b/build/buildah-ccpi.sh
@@ -0,0 +1,21 @@
+#! /usr/bin/env bash
+
+set -o errexit
+
+container=$(buildah from astra:latest)
+
+buildah config --env LANG="C.UTF-8" --env LC_ALL="C.UTF-8" --env TERM="xterm" --env CIL_VERSION=19.10 --env HOME=/ccpi/data $container
+buildah config --port 2222 $container
+
+buildah run $container bash /root/setup/repos.sh "all"
+
+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 ccpi:latest
+
+echo $container
+