Commit ca188073 authored by Christoph Wissing's avatar Christoph Wissing
Browse files

Update Readme.md

parent 2c696b00
......@@ -4,6 +4,17 @@ We are going to build a small web server now in a Singularity container.
The web server to be used is Caddy. The base Linux is again the small
Alpine.
Note that the Caddy web server needs to use TCP port 8080 inside the container. Port 80 would only work, if you run the container as root. Ports below 1024 are restricted. Check the Caddyfile. You can use also other ports, e.g. 8088.
Note that the HandsOn VM needs to have a firewall opening. (In case of Docker the container engine opens the firewall for you). For Singularity we do it ourselves:
```
sudo firewall-cmd --zone=public --add-port=1024-32000/tcp
sudo firewall-cmd --zone=public --add-source=192.168.56.0/24
```
If you get errors, you likely downloaded a very recent VM, that has this opening enabled permanently.
Building the container image:
> sudo singularity build mycaddy.sif mycaddy.def
......@@ -12,7 +23,9 @@ Now run it as an instance:
> singularity instance start -B $PWD/html-docs:/usr/share/caddy mycaddy.sif mycaddy01
You can connect to it like this
From a web browser can now reach your web server under [http://192.168.56.104:8080/](http://192.168.56.104:8080/). The IP address might be different. Note the port **8080** has to match the Caddyfile.
You can connect to the container instance like this
> singularity shell instance://mycaddy01
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment