summaryrefslogtreecommitdiffstats
path: root/run
diff options
context:
space:
mode:
Diffstat (limited to 'run')
-rw-r--r--run/devel.sh4
-rw-r--r--run/run-ssh.sh13
-rw-r--r--run/run.sh3
3 files changed, 18 insertions, 2 deletions
diff --git a/run/devel.sh b/run/devel.sh
index 57ec7f0..ad8fa15 100644
--- a/run/devel.sh
+++ b/run/devel.sh
@@ -6,4 +6,6 @@ if [ ! -d ../repos ]; then
buildah unshare bash ../build/extract.sh
fi
-podman run --name "ccpi-devel" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -v ~/ccpi/data:/ccpi/data -v ~/ccpi/repos:/ccpi/repos localhost/ccpi bash -c "bash /root/setup/provision.sh; bash"
+port="$(($(id -u) - 900))22"
+
+podman run --name "ccpi-devel" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -p $port:2222/tcp -v ~/ccpi/data:/ccpi/data -v ~/ccpi/repos:/ccpi/repos localhost/ccpi bash -c "bash /root/setup/provision.sh; bash"
diff --git a/run/run-ssh.sh b/run/run-ssh.sh
new file mode 100644
index 0000000..950024a
--- /dev/null
+++ b/run/run-ssh.sh
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+set -o errexit
+
+port="$(($(id -u) - 900))22"
+
+echo "Running on the port $port"
+echo "Create ssh tunnel and connect:"
+echo " ssh -L $port:localhost:$port $(hostname)"
+echo " and connect locally "
+echo " ssh -p $port localhost"
+
+podman run --name "ccpi-run" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -p ${port}:2222/tcp -v ~/ccpi/data:/ccpi/data localhost/ccpi /usr/sbin/sshd -D -p 2222
diff --git a/run/run.sh b/run/run.sh
index 5ebb075..0010e1d 100644
--- a/run/run.sh
+++ b/run/run.sh
@@ -2,4 +2,5 @@
set -o errexit
-podman run --name "ccpi-run" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -v ~/ccpi/data:/ccpi/data localhost/ccpi bash
+port="$(($(id -u) - 900))22"
+podman run --name "ccpi-run" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -p $port:2222/tcp -v ~/ccpi/data:/ccpi/data localhost/ccpi bash