jlesage / docker-jdownloader-2

Docker container for JDownloader 2
MIT License
772 stars 71 forks source link

Change port from Environment Variables #59

Closed eduarcor closed 1 year ago

eduarcor commented 4 years ago

Is there a way to change the port from the Environment Variables? I am using Docker inside of Synology DSM. As I am not really proficient with ports I am always creating the container with the option "Use the same network as Docker Host". If not, can you support it? If you are not able to do it and you have more application which shares the same default port and you can change it, you never can run them at the same time. Thanks

mr-bolle commented 4 years ago

Could you share your docker-compose enviroment settings. You can change the Host Ports like you wish.

version: '3'
services:
  jdownloader-2:
....
    ports:
      - "5801:5800"

5801 = Host Port 5800 = Container Port

eduarcor commented 4 years ago

I don't know what it lives... Please, tell me the location and the name of the file, docker-compose as a file name, doesn't exist in the config folder. Remember that I am using the Synology docker, is not command line, or whatever... And it is not exposed in the same way as other systems. But besides that, exposing this as a param, like in other docker containers, I guess is easy, right?

mr-bolle commented 4 years ago

Now i watch a video how Synology integration of docker works. And you are right, the usage is different.

Could you share the advanced network settings of your jdownloader container, maybe we find a solution (also if i don't habe a disc station)

Or you install Portainer, than you get full control of docker. And than you can easy adjust on your wishes.

https://youtu.be/ToL5SPFUPaQ

jlesage commented 4 years ago

Using the default bridge network mode is much easier than the Use the same network as Docker Host option. Any reason why you are not using this mode? You will then be able to map the container's ports to anything you want.

eduarcor commented 4 years ago

Even thought, if you have more than one docker container to the same port, you will still have a problem... I used this mode, because I don't want to increase complexity in my already complex system. I prefer to handle in that way... When I tried the other way, I was not able to make it work with some of the containers, so I do prefer to have it in same network as docker host. And as I said, working in synology is not as open and easy as in other systems. Exposing the port as an environment parameter it makes it more polyvalent for everyone. With no regression, but a good feature. I use it in other containers all the time.

jlesage commented 1 year ago

The latest image now has the ability to set the HTTP/VNC ports.