Using the current package of docker, from Terramaster, I was not able to deploy a simple docker compose without several problems. I will try to share all the fixes i have found during the really hard travel...
Disclaimer: the Terramaster docker is buggy, i don't recommend use it, but I have taken it as a challenge, and i hope this could help people. Please Terramaster staff, this issues (and many other) make people recommend third-party NAS. Please fix your software.
0.) Before all:
Use portainer software, for easier stack deployment. You could use the Terramaster container, or use the docker version, as you decide.
To deploy as a docker, use the following:
Code: Select all
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
1.) Fix DNS name resolutions
This error is caused by a wrong permissions configurations for the files inside /VolumeX/DockerData/containers: resolv.conf and hosts, and the container can't read both of them,
The problem could be fix is with the little script developed by @Bipe, using cron. (Nasty solution, but none other i have found)
2.) Fix volume permissions problems
Terramaster use ACL for files permissions, it's great, but is more complicated to configure it.
If you create a volume to be persisted, docker will create a directory inside the volumen subdirectory and it doesn't have the correct permissions for the user, but it can be resolved using ACL command:
Code: Select all
setfacl -PRdm u::rwx,g::rw,o::r /Volume1/DockerData/volumes
NOTE: This change the default permissions, if a volumen has been created before, it will not work (remove the -d parameter)
3.) More bugs... ???
Reserved for the future xDDD