Install Docker:
- (Debian/Ubuntu):
sudo apt install docker.io
- (Arch/Manjaro):
sudo pacman -S docker
Add yourself to the docker group (this is optional, but avoids the need for calling sudo
a bunch of times):
sudo usermod -aG docker ${USER}
Logout to take effect. Then:
docker run -it -p 3000:3000 -v $(pwd):/data webtin
Point your web browser to localhost:3000 and it's done.
Tintin will read a config.tin file script from the directory where the container was launched. This can be changed by substituting $(pwd)
with the absolute path of your choice.
-p <x>:<y>
means matching port <x> on the host to port <y> within the container. By construction, Webtin listens to port 3000, but you can change <x> to whichever port you like, e.g. -p 80:3000
for default http port.
When trying to connect to the Docker host from within the container, you have to look up its IP on the docker network. You can easily do this by running ip a
on the host to find out the IP address of the docker0
adapter. In this case 172.17.0.1:
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500
link/ether 02:42:e8:a9:95:58 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
An alternative would be to use --network host
in your docker run
command. See here for more info.
Add #CONFIG {CHILD LOCK} ON
to config.tin in order to prevent users from getting command line access to the insides of the container.
Although this is not a big concern, given that it still is just a container, it definitely is conceptually wrong when serving mulptiple users, as they could theoretically kill any active session.
Launch the container in detached mode:
docker run -d -p 3000:3000 -v $(pwd):/data webtin
See docker run --help
and docker stop --help
.
Here be info.
If there are any issues with colors the best thing to try is setting #config color_patch on
in tintin.
Docker provides runtime options for limiting CPU and memory usage. See here.
Many thanks to Pulvazza for getting this figured out and written up.