Passing the `kong-url` when in docker-compose
Closed this issue · 1 comments
Deleted user commented
I am trying to use this in a dockerfile of my own making, and being very new to docker, I am struggling to figure out how to pass kong-url
into the container.
Here is what I have so far, specific to the dashboard (the dependencies are also defined, but not relevant):
kong-dashboard:
image: pgbi/kong-dashboard
container_name: kong-dashboard
restart: on-failure
depends_on:
kong:
condition: service_healthy
ports:
- 8080:8080
I've tried looking for an answer and the best I found was to add this (as in your repository's compose config):
build:
context: .
args:
kong-url: http://kong:8001
This has no effect when not using your repository, and trying this separately. My container simply keeps cycling the following error:
kong-dashboard | bin/kong-dashboard.js <cmd> [args]
kong-dashboard |
kong-dashboard | Commands:
kong-dashboard | start Start serving Kong Dashboard
kong-dashboard |
kong-dashboard | Options:
kong-dashboard | -v, --verbose Increase kong-dashboard command line verbosity [boolean]
kong-dashboard | --help Show help [boolean]
kong-dashboard | --version Show version number [boolean]
kong-dashboard |
kong-dashboard | Examples:
kong-dashboard | bin/kong-dashboard.js start \ Start Kong Dashboard on default port
kong-dashboard | --kong-url http://kong:8001 8080
kong-dashboard |
kong-dashboard | bin/kong-dashboard.js start \ Start Kong Dashboard on port 8888
kong-dashboard | --kong-url http://kong:8001 \
kong-dashboard | --port 8888
kong-dashboard |
kong-dashboard | bin/kong-dashboard.js start \ Start Kong Dashboard on port 8080.
kong-dashboard | --kong-url http://kong:8001 \ Protect it with basic auth. Define
kong-dashboard | --basic-auth u1=p1 u2=p2 two users, "u1" with password "p1"
kong-dashboard | and "u2" with password "p2"
I'll bet you can show me how stupid I'm being very quickly...
Deleted user commented
Answering my own question here:
Not easy to find this out, but adding the following instead of any build
stuff works:
command: start --kong-url http://kong:8001