Open looeee opened 1 year ago
Glad that this was helpful when setting up your own docker environment.
The main point of that build that you removed to get your container working was to add the Tailscale key to the container. Did you do that manually instead?
Ah that makes sense. Yes I added the key as an environment variable.
After setting this up I also had to add:
command: tailscaled
And from another guide I added these lines, although I'm not sure if they were needed.
cap_add:
- net_admin
- sys_module
And finally once it was running, I had to run a command from within the container:
docker exec -it tailscale tailscale up
Eso tiene sentido. Sí, agregué la clave como una variable de entorno.
Después de configurar esto, también tuve que agregar:
command: tailscaled
Y de otra guía agregué estas líneas, aunque no estoy seguro si hacían falta.
cap_add: - net_admin - sys_module
Y finalmente, una vez que se estaba ejecutando, tuve que ejecutar un comando desde dentro del contenedor:
docker exec -it tailscale tailscale up
Hello Can you share the final docker-compose and the steps I'm going crazy
Thank you
version: "3"
services:
tailscale:
image: tailscale/tailscale:stable
container_name: tailscale
environment:
- SECRET_AUTH_KEY
volumes:
- /var/lib:/var/lib
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
command: tailscaled
privileged: true
network_mode: "host"
restart: unless-stopped
Once the container is uo you need to run the command
docker exec -it tailscale tailscale up --advertise-exit-node
It took me a while to get this working but in the end, the problem was not docker, it was that I didn't fully understand Tailscale and VPNs. Took me some research to work everything out but it's been smooth sailing since.
Thanks for sharing this, it's helpful while I am learning docker.
To get this to work in portainer I had to remove these lines:
I also changed the image to latest
Then the container deploy successfully