Removed the builder step by building directly on Steam's Ubuntu image, leading in a smaller final container (efficiency score 95% according to dive Actually added the builder back, but after reorganising and cleaning up some stuff, image is now only 718 Mb with 99% efficiency.
Removed the need to reacquire root during the build by directly setting the correct permissions via --chown and --chmod flags in the Dockerfile
Added support for build arg TMOD_VERSION=latest so it automatically grabs the latest available release
Reworked the directory structure like so:
The server itself lives in /terraria-server
Worlds, Mods, server_config.txt and enabled_mods.json all live in /data
This means users can now bind mount one folder on the host to /data and they'll find everything in there, which is useful for persistance across restarts.
NOTE: As per the recommended approach, users must chown the host folder to 456:456 before starting the container, otherwise the container might not be able to write its stuff in it.
Example:
chown -R 456:456 /path/on/the/host/terraria
docker run -v /path/on/the/host/terraria:/data
Removed the builder step by building directly on Steam's Ubuntu image, leading in a smaller final container (efficiency score 95% according to diveActually added the builder back, but after reorganising and cleaning up some stuff, image is now only 718 Mb with 99% efficiency.--chown
and--chmod
flags in the DockerfileTMOD_VERSION=latest
so it automatically grabs the latest available releaseNOTE: As per the recommended approach, users must chown the host folder to 456:456 before starting the container, otherwise the container might not be able to write its stuff in it.
Example: