SmartPhoneLover Posted April 8, 2019 Share #1 Posted April 8, 2019 (edited) Hi all, I'm trying to set up Portainer within Docker, but I have a problem trying to add and also make that change permanent, to allow Portainer look into '/var/run/docker.sock' for the local Endpoint. I have tried both ways, I mean: - Create and configure the container using the Synology Docker app (GUI), but here, as /var/run is a root directory, I can't load the 'docker.sock' file. - Create and configure it within Terminal (PuTTY): docker run -d -p 32770:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/Portainer:/data portainer/portainer. But the docker.sock link just disappears after starting it everytime. I have tried to make a symlink of /var/run dir to one of my user volumes so I can access these files easily, but docker.sock image was not shown there, so couldn't link it within Docker container settings. Edited April 8, 2019 by SmartPhoneLover Quote Link to comment Share on other sites More sharing options...
Lethal Posted April 8, 2019 Share #2 Posted April 8, 2019 (edited) Try to make a symlink of just /var/run/docker.sock and mount the location of the GUI-accessible file to /var/run/docker.sock. What I ended up doing was to create a scheduled task that runs a script on reboot as root. The contents of the script (which symlinks the file): sudo ln -s /var/run/docker.sock /volume1/docker/docker.sock Edited April 8, 2019 by Lethal Quote Link to comment Share on other sites More sharing options...
SmartPhoneLover Posted April 8, 2019 Author Share #3 Posted April 8, 2019 (edited) Hi, thank you for the answer. Yes, that was what I ended up doing. Edited April 8, 2019 by SmartPhoneLover Quote Link to comment Share on other sites More sharing options...
flyride Posted April 8, 2019 Share #4 Posted April 8, 2019 (edited) Just curious, what is Portainer doing for you that the native Syno docker manager doesn't? I use Portainer on non-DSM Docker hosts, but never thought to load it up on DSM. Edited April 8, 2019 by flyride Quote Link to comment Share on other sites More sharing options...
Lethal Posted April 8, 2019 Share #5 Posted April 8, 2019 7 minutes ago, SmartPhoneLover said: Hi, thank you for the answer. Yes, that was what I ended up doing. Glad you were able to get it working! 2 minutes ago, flyride said: Just curious, what is Portainer doing for you that the native Syno docker manager doesn't? I use Portainer on non-DSM Docker hosts, but never thought to load it up on DSM. Some people think that its easier to manage docker containers using Portainer, likely because they are used to it. Also, it is directly accessible through a web interface unlike DSM's docker. Quote Link to comment Share on other sites More sharing options...
SmartPhoneLover Posted April 8, 2019 Author Share #6 Posted April 8, 2019 (edited) 9 minutes ago, flyride said: Just curious, what is Portainer doing for you that the native Syno docker manager doesn't? I use Portainer on non-DSM Docker hosts, but never thought to load it up on DSM. I just wanted to know and see the difference that Portainer seems to offer to manage them. I'm just curious 😉 And, as @Lethal mentioned before, to be able to manage containers without logging in to DSM Edited April 8, 2019 by SmartPhoneLover Quote Link to comment Share on other sites More sharing options...
SmartPhoneLover Posted April 8, 2019 Author Share #7 Posted April 8, 2019 SOLVED Quote Link to comment Share on other sites More sharing options...
haydibe Posted April 8, 2019 Share #8 Posted April 8, 2019 Did you ever try to start a compose.yml from the Synology Docker-UI? That's something Portainer does in the blink of an eye. Same is true for cleaning up orphaned images and volumes. The Synology Docker-UI has it's strongsuite when it commes to simplicity. You missed to add a volume, portmapping or an environment variable? Stop you container, do your modifications, start the container and be good Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.