Solved How to access docker from external site

Currently reading
Solved How to access docker from external site

100
11
NAS
DS412+
Dears,

I am building a Django Website from Docker, which is in bridge mode and running. But it can only ping-ed within SSH in SynoNAS. I read port mapping would be a nice solution, but how? e.g. within my home network it would look like:
http(s)://DSM:12345 => my Django website in Docker

appreciate any thoughts and sharing... thanks!
@Telos: I read your reply there, would you shine a light ;-)?

(PS: this is not the DSM app: webstation, but could be linked together later for WWW.)

/BR
 
@Rusty @fredbert thanks for your quick response.

what's reverse proxy?I feel reluctant to install any new packages or services...

maybe I didn't explain my question more clearly... My 1st goal is to access docker(my website) outside of SynoNAS(not yet Internet). For this, I would guess some setting need to be changed, e.g.

  • within docker(bridge mode): edit /etc/host.??? to map/assign my Django website IP( e.g. 127.0.0.1) to docker's bridged IP;
  • within DSM: edit e.g. /etc/host? to map NAS_IP: port to Docker's IP: port
Maybe something like that...
 
I am afraid this on is about publishing the container port on the host. The OP's posts are a little bit to ambigous...
If I am right, stop your container, edit it, change to the "Port Setting" tab and add your port mappings.

Since you seem to have created the image yourself, I hope you declared the port your application is listening on with EXPOSE. All ports declared as EXPOSE will be used as container ports and assigned to random host ports. Just change the random host ports to whatever you like.
 
A forward proxy server is one that internal users send web requests to (or transparently intercepts them) and creates an onward request to the destination web server. This allows things like content filtering and anti-virus scanning to be applied, also it can apply different Internet access policies based on device or authenticated user/group. Most businesses will apply some form of forward proxy service.

A reverse proxy server is placed in front of web servers and will receive incoming requests from Internet (and other) web clients. There are various reasons to do this such as adapting (rewriting) the URL or parts of it so that in meets the structure used by internal/protected web servers. Other reasons can be to cache content and take load off the web servers.

The DSM Reverse Proxy service is already installed and accessed via Control Panel -> Application Portal page: see the Reverse Proxy tab.

My 1st goal is to access docker(my website) outside of SynoNAS(not yet Internet).
This is done by doing this...
Provided you changed the mapped DSM port from 'auto' to 12345 ...
Stop your container and Edit it. Got to the Port Settings tab and change the local port from 'auto' to some number, i.e. 12345. Now the Container port will change whenever you stop/start it but the DSM IP's port will be fixed to 12345.
 
@fredbert THNAKS!

A forward proxy server is one that internal users send web requests to (or transparently intercepts them) and creates an onward request to the destination web server. This allows things like content filtering and anti-virus scanning to be applied, also it can apply different Internet access policies based on device or authenticated user/group. Most businesses will apply some form of forward proxy service.

A reverse proxy server is placed in front of web servers and will receive incoming requests from Internet (and other) web clients. There are various reasons to do this such as adapting (rewriting) the URL or parts of it so that in meets the structure used by internal/protected web servers. Other reasons can be to cache content and take load off the web servers.

The DSM Reverse Proxy service is already installed and accessed via Control Panel -> Application Portal page: see the Reverse Proxy tab.


This is done by doing this...

Stop your container and Edit it. Got to the Port Settings tab and change the local port from 'auto' to some number, i.e. 12345. Now the Container port will change whenever you stop/start it but the DSM IP's port will be fixed to 12345.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
You could register it inside Docker UI - Setup a docker registry on Synology
Replies
5
Views
5,975
I registered and want to post this for the sake of anyone who might come along looking for answers like I...
Replies
10
Views
13,392
I am trying to solve a similar case: I am going to run my nginx:stable-alpine web server in Docker, with...
Replies
16
Views
10,452
I can not install downloaded files for additional functionality in odoo In the docker I have got the...
Replies
0
Views
2,177
traefik sounds intriguing, but I have a strict policy of not running programs that are smarter than I am.
Replies
9
Views
6,881
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
402
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
978

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top