Error when run Kong database with docker container
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 849
- PR merge metrics
- No merged PRs in 30d
Description
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
>
>api-eli-kong-kong-migrations-1 | /usr/local/share/lua/5.1/kong/globalpatches.lua:590: in function
>
> 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
> api-eli-kong-kong-migrations-1 | [C]: in function 'xpcall'
> api-eli-kong-kong-migrations-1 | init_worker_by_lua:54: in function
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported `kong migrations bootstrap` command with the `kong/kong-gateway:3.5.0.0` image on the stated Docker Compose and CentOS Stream 9 setup. Investigate the `/etc/hosts: Permission denied` error in the container and confirm that the migrations complete successfully without it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100