dkan
dkan copied to clipboard
How to set the IP to a localhost?
I am running dkan with Docker.
This is how the output of docker container ls
looks like:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bed5070fe666 traefik:v2.0 "/entrypoint.sh --lo…" 9 hours ago Up 2 hours 0.0.0.0:80->80/tcp, 0.0.0.0:433->433/tcp, 0.0.0.0:8080->8080/tcp dktl-proxy
25490c69c7e9 getdkan/dkan-cli:v0.3.0 "/opt/startup.sh /us…" 3 weeks ago Up 24 minutes 0.0.0.0:49158->8888/tcp dkan_cli_1
e4d5d3568921 wodby/mariadb:10.3-3.8.5 "/docker-entrypoint.…" 3 weeks ago Up 24 minutes 0.0.0.0:49162->3306/tcp dkan_db_1
a387833a42f6 getdkan/dkan-web:v0.2.0 "httpd-foreground" 3 weeks ago Up 24 minutes 0.0.0.0:49161->80/tcp, 0.0.0.0:49160->443/tcp, 0.0.0.0:49159->8888/tcp dkan_web_1
I have extended DKAN with the WebFrom module for Drupal and I want it to send a GET request to another server that is running locally (ex. 127.0.0.1:22).
The problem is that dkan is having the 0.0.0.0
address and I can't map it to a local one. I have been looking on the internet for proposed solutions and I found one which proposed using a network bridge.
The output of docker network ls
NETWORK ID NAME DRIVER SCOPE
28a046cd8589 bridge bridge local
e5467775dcbd dkan_default bridge local
8835bea6ddfd host host local
b8720d83a74d none null local
So I have noticed that it already exists one called dkan_default
. Is there a way to edit it so that I can communicate with other local IP? I was also looking at dkan tools but I can't find a command that would automatically do it. Nevertheless, I doubt I am the first one trying to do this, so I hope someone already has a workaround for this problem.