qmacro / qmacro.github.io

MIT License
4 stars 4 forks source link

2021/06/12/remote-access-to-docker-on-my-synology-nas/ #6

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Remote access to Docker on my Synology NAS

Here’s what I did to enable remote access to the Docker install on my Synology NAS.

http://qmacro.org/2021/06/12/remote-access-to-docker-on-my-synology-nas/

Xcorp24 commented 3 years ago

You are the best :)

ghost commented 2 years ago

Invaluable to another Synology-work-from-home-devOp-engineer!

mikemmgkc commented 2 years ago

Very new to this, so apologies if this is a dumb question.

For this section:

; docker context create \ --docker host=ssh://administrator@ds1621plus \ --description="Synology NAS" \ synology

The "administrator@ds16212" would actually be the admin username @ the Synology IP address? I've tried it a couple of ways, and am getting the following error when using the "docker image ls" command:

error during connect: Get "http://docker.example.com/v1.24/images/json": command [ssh -l [MYADMINUSER] -- syn220 docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=kex_exchange_identification: read: Connection reset by peer

Any info would be much appreciated. Thanks!

mikemmgkc commented 2 years ago

I'm getting this error on the "Add the location of the docker executable in the PATH variable via .ssh/environment" step:

admin@syn220:~$ env | grep PATH | tee .ssh/environment tee: .ssh/environment: No such file or directory

Not sure why. Thanks!

sarumont commented 2 years ago

Thanks for this write-up - very helpful indeed!

One thing to mention is that the docker context does not take into account your ~/.ssh/config. This means that if you are running ssh on a non-standard port on your NAS, that must be included in the context i.e.: --docker host=ssh://admin@synology:2222.