There has to be a better way to get the docker0 ip address. This will get it
ifconfig | awk '/docker0/{getline; print}' | awk '{ print $2 }'
You can then create an environment variable
export DOCKERHOST=$(ifconfig | awk '/docker0/{getline; print}' | awk '{ print $2 }')
Change the issuer to use the environment variable
const keycloakIssuer = await Issuer.discover("http://"+ process.env.DOCKERHOST +":8080/realms/keycloak-express")
Can pass it in on docker run
docker run -p 3000:3000 -e DOCKERHOST=$DOCKERHOST quay.io/austincunningham/keycloak-express-openid-client:latest
For docker compose you can use a env file to pass in environment variables
Hey, Austin! Sorry for taking so long to reply, but I wanted to thank you for your help! It really helped me and worked like a charm! :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There has to be a better way to get the docker0 ip address. This will get it
You can then create an environment variable
Change the issuer to use the environment variable
Can pass it in on docker run
For docker compose you can use a env file to pass in environment variables
Hey, Austin! Sorry for taking so long to reply, but I wanted to thank you for your help! It really helped me and worked like a charm! :)