It is currently Sun Sep 20, 2020 3:22 am
All times are UTC + 8 hours

default docker port configuration

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

default docker port configuration

Postby aenigmainc » Wed May 13, 2020 6:30 am

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.
aenigmainc
 
Posts: 38
Joined: Wed Jul 16, 2014 1:16 am

Re: default docker port configuration

Postby notdisclosed » Sat May 23, 2020 11:25 pm

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) :(
notdisclosed
 
Posts: 3
Joined: Sat May 23, 2020 11:14 pm

Re: default docker port configuration

Postby Nazar78 » Mon May 25, 2020 11:49 am

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...
Last edited by Nazar78 on Tue May 26, 2020 9:26 pm, edited 1 time in total.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
Nazar78
 
Posts: 119
Joined: Wed Jul 17, 2019 10:21 pm

Re: default docker port configuration

Postby notdisclosed » Tue May 26, 2020 9:19 pm

@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.
notdisclosed
 
Posts: 3
Joined: Sat May 23, 2020 11:14 pm

Re: default docker port configuration

Postby aenigmainc » Wed Jun 03, 2020 8:29 pm

worked perfect. Thank you so much for this
aenigmainc
 
Posts: 38
Joined: Wed Jul 16, 2014 1:16 am

Return to Docker

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest