Quick docker question (help clear up some confusion)

49 views
Skip to first unread message

Jonathan Brooks

unread,
Aug 5, 2021, 5:57:29 PM8/5/21
to dcm4che
Dear Gunter, Vrinda, All,

Hope you can help clear something up.

When we start the keycloak container we do not specify the host it's running on.
When we start the arc container, we pass it AUTH_SERVER_URL.
The keycloak container is the authentication server.

As per advice AUTH_SERVER_URL should be the hostname for your <docker-host>.

Question 1/ is <docker host> equivalent to e.g. the linux box's hostname?

Question 2/ should this <docker host> have an entry in /etc/hosts? If not what other name resolution is acceptable (e.g. in the case when you don't have access to a DNS server)?

Question 3/ Alternatively, should the entry in /etc/hosts map the private network address of the keycloak container e.g. 172.18.0.2, to a name e.g. "docker-keycloak"
I.e.
/etc/hosts:
127.0.0.1      localhost
172.18.0.2    docker-keycloak

The reason I ask is because for the archive container (arc) to resolve the authentication server (AUTH_SERVER_URL) that would have to assume that the keycloak server was started on e.g. <docker host> - but it's not clear if this is the "real" linux host (i.e. hostname) or the container host (e.g. 172.18.0.2).

Hope someone can help put me straight on this.

Best wishes,

Jon


Jonathan Brooks

unread,
Aug 10, 2021, 12:52:21 PM8/10/21
to dcm4che
When I start my docker container for keycloak and look at the logs it reports:

2021-08-10 17:44:37,732 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://172.18.0.3:8990/management and https://172.18.0.3:8993/management
2021-08-10 17:44:37,732 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://172.18.0.3:8990 and https://172.18.0.3:8993

which is different from the suggested output given here:

2017-09-05 12:04:10,979 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:8990/management 2017-09-05 12:04:10,980 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:8990 2017-09-05 12:04:10,980 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 3.4.0.Final (WildFly Core 2.0.10.Final) started in 11406ms - Started 450 of 825 services (562 services are lazy, passive or on-demand)

admittedly this is just an example from the webpage, but it looks keycloak is listening on 0.0.0.0, rather than a specific IP address.

Do I just need to make sure that I have an entry in my /etc/hosts file for 172.18.0.3?

Best,

Jon
Reply all
Reply to author
Forward
0 new messages