Page 1 of 1

default docker port configuration

Posted: Wed May 13, 2020 6:30 am
by aenigmainc
I was using Portainer to connect to my docker container
The portainer endpoint was configured:
Name: mydocker
Endpoint URL: a.b.c.d:2375
Public IP: a.b.c.d


This used to work, now it doesn't. I noticed there was an update that says Docker now only allows local access only.
Of course I immediately tried:
Name: mydocker
Endpoint URL:0.0.0.0:2375
Public IP: 0.0.0.0

And that didn't work. Because portainer is a container running on that same dockerd and 0.0.0.0 is the portainer container, NOT the asustor box.

And that is my problem. Where do I configure this to allow other than local connectivity?

By the way, when i try to connect it says the endpoint is down, but its obviously up as portainer is a container itself. From the cli I can do a docker ps and see my containers running, start, stop and otherwise manage. I just can't seem to figure out what file the config is in so I can modify for external access.

thanks for any assistance.

Re: default docker port configuration

Posted: Sat May 23, 2020 11:25 pm
by notdisclosed
Is there a solution yet? How should I configure portainer to make it work?

Tried forcing an install of version r4 using apkg but that caused my containers to no longer work. Before that an update did not work due to a timeout.

For me it is too late. But for the next time..... Is there a way to rollback these updates (apart from snapshots which I did not make) :(

Re: default docker port configuration

Posted: Mon May 25, 2020 11:49 am
by Nazar78
Edit this file i.e. using vi:

Code: Select all

/volume1/.@plugins/AppCentral/docker-ce/CONTROL/start-stop.sh
Change line #6 FROM:

Code: Select all

DOCKERD_OPT="--data-root /usr/local/AppCentral/docker-ce/docker_lib/"
TO:

Code: Select all

DOCKERD_OPT="--data-root /usr/local/AppCentral/docker-ce/docker_lib/ -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"
Restart docker-ce:

Code: Select all

apkg --disable docker-ce;sleep 10;apkg --enable docker-ce
Check if the listener goes online, there should be one tcp4 and one unix sock:

Code: Select all

netstat -nap|grep -E ':2375|docker.sock'|grep LISTEN
If it fails to start, check that the unix socket is not changed to become a directory (still puzzled why mine somehow becomes a directory). Delete this directory if it exists because it should be created as a unix socket and it can't be created if the same name directory exists, then restart docker-ce. If it still fails which probably mount in use, just restart your NAS:

Code: Select all

file /var/run/docker.sock
We probably need to repeat this in future docker-ce updates...

Re: default docker port configuration

Posted: Tue May 26, 2020 9:19 pm
by notdisclosed
@Nazar78: Thank you for the solution. My docker instance took a bit longer to go down. But after shutting it down using the NAS webinterface and starting it up again it worked.

Re: default docker port configuration

Posted: Wed Jun 03, 2020 8:29 pm
by aenigmainc
worked perfect. Thank you so much for this