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.

Moderator: Lillian.W@AST

Post Reply
aenigmainc
Posts: 38
youtube meble na wymiar Warszawa
Joined: Wed Jul 16, 2014 1:16 am

default docker port configuration

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

Re: default docker port configuration

Post 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) :(
User avatar
Nazar78
Posts: 2003
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: default docker port configuration

Post 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...
Last edited by Nazar78 on Tue May 26, 2020 9:26 pm, edited 1 time in total.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
notdisclosed
Posts: 3
Joined: Sat May 23, 2020 11:14 pm

Re: default docker port configuration

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

Re: default docker port configuration

Post by aenigmainc »

worked perfect. Thank you so much for this
Post Reply

Return to “Docker”