Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when run Kong database with docker container #683

Open
gomslhi opened this issue Nov 10, 2023 · 0 comments
Open

Error when run Kong database with docker container #683

gomslhi opened this issue Nov 10, 2023 · 0 comments
Labels

Comments

@gomslhi
Copy link

gomslhi commented Nov 10, 2023

I'm just learning to use Kong and I just created containers for the postgres database and when I create Kong database I got an error like this:

api-eli-kong-kong-migrations-1 | ERROR: /usr/local/share/lua/5.1/kong/tools/dns.lua:39: /etc/hosts: Permission denied
api-eli-kong-kong-migrations-1 stack traceback:
api-eli-kong-kong-migrations-1 | /usr/local/share/lua/5.1/kong/tools/dns.lua:39: in function
</usr/local/share/lua/5.1/kong/tools/dns.lua:7>
api-eli-kong-kong-migrations-1 | /usr/local/share/lua/5.1/kong/globalpatches.lua:590: in function
</usr/local/share/lua/5.1/kong/globalpatches.lua:4>
api-eli-kong-kong-migrations-1 | /usr/local/bin/kong:6: in function 'file_gen'
api-eli-kong-kong-migrations-1 | init_worker_by_lua:47: in function <init_worker_by_lua:45>
api-eli-kong-kong-migrations-1 | [C]: in function 'xpcall'
api-eli-kong-kong-migrations-1 | init_worker_by_lua:54: in function <init_worker_by_lua:52>

I ran it using this:
docker run --rm --network=kong-network -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" -e "KONG_PG_PASSWORD=test" -e "KONG_PASSWORD=test" kong/kong-gateway:3.5.0.0 kong migrations bootstrap
I use Docker Compose version v2.21 and OS CentOS Stream 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants