Skip to content
Commits on Source (2)
...@@ -6,14 +6,17 @@ set -e ...@@ -6,14 +6,17 @@ set -e
if [ "x$SAFE_MODE" == "xTrue" ]; then if [ "x$SAFE_MODE" == "xTrue" ]; then
echo "" echo ""
echo "[INFO] Not executing entrypoint as we are in safe mode, just opening a Bash shell." echo "[INFO] Not executing entrypoint as we are in safe mode, just opening a Bash shell."
exec /bin/bash exec /bin/bash
else else
echo "" echo ""
echo "[INFO] Executing entrypoint..." echo "[INFO] Executing entrypoint..."
#--------------------- #---------------------
# Setup home # Setup home
#--------------------- #---------------------
...@@ -29,7 +32,7 @@ else ...@@ -29,7 +32,7 @@ else
if [ -e "$x" ]; then cp -a "$x" /home/metauser/; fi if [ -e "$x" ]; then cp -a "$x" /home/metauser/; fi
done done
# Mark as initialized # Mark as initialized
touch /home/metauser/.initialized touch /home/metauser/.initialized
fi fi
...@@ -37,7 +40,8 @@ else ...@@ -37,7 +40,8 @@ else
echo "[INFO] Setting up HOME env var" echo "[INFO] Setting up HOME env var"
export HOME=/home/metauser export HOME=/home/metauser
cd /home/metauser cd /home/metauser
#--------------------- #---------------------
# Save env # Save env
#--------------------- #---------------------
...@@ -55,7 +59,17 @@ else ...@@ -55,7 +59,17 @@ else
echo "export $env_var" >> /tmp/env.sh echo "export $env_var" >> /tmp/env.sh
fi fi
done done
#---------------------
# Storage link
#---------------------
if [ -e "/storages" ]; then
echo "[INFO] Creating link from /home/metauser/storages to /storages."
ln -s /storages /home/metauser/storages
fi
#--------------------- #---------------------
# Prompt # Prompt
#--------------------- #---------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Various Docker and Singularity containers. Various Docker and Singularity containers.
Hierarchy: ### Hierarchy
- Base - Base
- X11Web - X11Web
...@@ -11,4 +11,42 @@ Hierarchy: ...@@ -11,4 +11,42 @@ Hierarchy:
- ViaLacteaVisualAnalytics - ViaLacteaVisualAnalytics
- JupyterNotebook - JupyterNotebook
- SSH - SSH
- XCalc - XCalc
\ No newline at end of file
### Interfaces
The container starts by automatically exposing their interfaces:
- The containers based on the X11Web container (as the desktops) expose a web-based VNC client (KasmVNC) on port 8590
- The JupyterNotebook container expose the Notebook server on port 8888
- The SSH container expose the OpenSSH server on port 22
All the containers support changing the default port using the `BASE_PORT` environment variable.
### Usage
You can eithe directly run the containers, e.g.:
docker run -p8590:8590 git.ia2.inaf.it:5050/exact/swc/basicdesktop:v0.3.0
or use tham as base containers for your own ones:
FROM git.ia2.inaf.it:5050/exact/swc/basicdesktop:v0.3.0
### Supported engines
These containers are built to be supported by nearly any container engine. These include:
- Docker
- Podman (rootful and rootless)
- Singularity
However, beware some permission errors which may arise after extending them and installing extra software, in particular with Singularity. You can add a line like this at the end of your Dockerfile to be sure the home folder is always set as writable by anyone (required for these containers to work with Singularity):
# Fix home permissions
RUN chmod 777 /home
\ No newline at end of file