# I can't install docker kong problem

**URL:** <https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550>\
**Category:** Questions\
**Created:** [July 24, 2018, 12:16pm UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550 "2018-07-24T12:16:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonas](https://discuss.konghq.com/u/Jonas)\
**Post date:** [July 24, 2018, 12:16pm UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/1 "2018-07-24T12:16:09Z")

</div>

hello,

i can’t install docker with these guides:

> **[Installation Options - Kong Gateway | Kong Docs](https://docs.konghq.com/gateway/latest/install/)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

[https://hub.docker.com/\_/kong/](https://hub.docker.com/_/kong/)

a few months ago, with kong 0.13.0 the containers installation was correct.

Thanks for the answers

---

<div class="post-metadata">

**Author:** ![kikito](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kikito/32/15_2.png) [@kikito](https://discuss.konghq.com/u/kikito)\
**Post date:** [July 24, 2018, 12:55pm UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/2 "2018-07-24T12:55:52Z")

</div>

Please add more information: which steps did you follow, what was the expected result, and what did you receive instead.

Also, note that the official docs for installing with Docker are inside the Kong docs page:

- [https://docs.konghq.com/install/docker/](https://docs.konghq.com/install/docker/)

---

<div class="post-metadata">

**Author:** ![Jonas](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonas](https://discuss.konghq.com/u/Jonas)\
**Post date:** [July 25, 2018, 6:20am UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/3 "2018-07-25T06:20:10Z")

</div>

hi kikito:

I execute:

docker run -d --name kong-database   
-p 9042:9042   
cassandra:3

docker run --rm   
-e “KONG\_DATABASE=cassandra”   
-e “KONG\_CASSANDRA\_CONTACT\_POINTS=kong-database”   
kong:latest kong migrations up

docker run -d --name kong   
–network=kong-net   
-e “KONG\_DATABASE=cassandra”   
-e “KONG\_CASSANDRA\_CONTACT\_POINTS=kong-database”   
-e “KONG\_PROXY\_ACCESS\_LOG=/dev/stdout”   
-e “KONG\_ADMIN\_ACCESS\_LOG=/dev/stdout”   
-e “KONG\_PROXY\_ERROR\_LOG=/dev/stderr”   
-e “KONG\_ADMIN\_ERROR\_LOG=/dev/stderr”   
-e “KONG\_ADMIN\_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl”   
-p 8000:8000   
-p 8443:8443   
-p 8001:8001   
-p 8444:8444   
kong:latest

but the kong conrainer don’t start.

also with option  
docker network create kong-net

Moreover i have try with the version 0.13, no latest  
kong:0.13.0 and 0.13.1

but the result is the same.

i try this installation with  
docker-ce-18.06.0.ce-3.el7.x86\_64 in Centos 7, selinux disabled  
and  
docker 18.03.1-ce MAC OS Sierra 10.12.6

thank you

---

<div class="post-metadata">

**Author:** ![kikito](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kikito/32/15_2.png) [@kikito](https://discuss.konghq.com/u/kikito)\
**Post date:** [July 25, 2018, 10:04am UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/4 "2018-07-25T10:04:00Z")

</div>

Hi,

You didn’t mention when you created a kong net. This step is needed _before_ calling `docker run`:

```plaintext
docker network create kong-net

```

Make sure you use the `--network=kong-net` option in _all_ the calls to `docker run`. In your example, the `kong-database` one does not have the option.

> but the kong conrainer don’t start.

Did you see any error message? You might be able to see them by executing

```plaintext
docker logs kong

```

---

<div class="post-metadata">

**Author:** ![Jonas](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonas](https://discuss.konghq.com/u/Jonas)\
**Post date:** [July 25, 2018, 11:57am UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/5 "2018-07-25T11:57:51Z")

</div>

Hi kikito,

I had created de network at the begining. I have try to install with and without this option.

docker don’t show any logs in Centos 7  
in Mac osx show:

2018/07/25 11:54:44 [warn] You are using Cassandra but your ‘db\_update\_propagation’ setting is set to ‘0’ (default). Due to the distributed nature of Cassandra, you should increase this value.  
2018/07/25 11:54:45 [warn] You are using Cassandra but your ‘db\_update\_propagation’ setting is set to ‘0’ (default). Due to the distributed nature of Cassandra, you should increase this value.  
2018/07/25 11:54:45 [warn] 1#0: [lua] cluster.lua:136: set\_peer\_down(): [lua-cassandra] setting host at kong-database-test DOWN  
nginx: [warn] [lua] cluster.lua:136: set\_peer\_down(): [lua-cassandra] setting host at kong-database-test DOWN  
2018/07/25 11:54:45 [error] 1#0: init\_by\_lua error: /usr/local/share/lua/5.1/kong/init.lua:164: all hosts tried for query failed. kong-database-test: host seems unhealthy, considering it down (host or service not provided, or not known)  
stack traceback:  
[C]: in function ‘assert’  
/usr/local/share/lua/5.1/kong/init.lua:164: in function ‘init’  
init\_by\_lua:3: in main chunk  
nginx: [error] init\_by\_lua error: /usr/local/share/lua/5.1/kong/init.lua:164: all hosts tried for query failed. kong-database-test: host seems unhealthy, considering it down (host or service not provided, or not known)  
stack traceback:  
[C]: in function ‘assert’  
/usr/local/share/lua/5.1/kong/init.lua:164: in function ‘init’  
init\_by\_lua:3: in main chunk

thank you very much

---

<div class="post-metadata">

**Author:** ![thibaultcha](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/thibaultcha/32/340_2.png) [@thibaultcha](https://discuss.konghq.com/u/thibaultcha)\
**Post date:** [July 25, 2018, 2:38pm UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/6 "2018-07-25T14:38:19Z")

</div>

The error is clear in your logs:

```auto
kong-database-test: host seems unhealthy, considering it down (host or service not provided, or not known)

```

Kong cannot reach the database (and the migration step probably failed as well). We also see in those logs that you seem to be using a different name that the one you created your database container with (kong-database-test vs. kong-database).

So:

1. Make sure that you added the database container to the Docker network you defined
2. Make sure to add the ephemeral migrations container _and_ the Kong container to it as well
3. Make sure to use the proper name when referring to the database container in both of the above steps

Let us know how it goes.

---

<div class="post-metadata">

**Author:** ![Jonas](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonas](https://discuss.konghq.com/u/Jonas)\
**Post date:** [July 26, 2018, 5:56am UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/7 "2018-07-26T05:56:20Z")

</div>

yes,

you see “kong-database-test” because I have done several test but I use the proper name.

how can I do a new install of kong 0.13?

thanks

---

<div class="post-metadata">

**Author:** ![Jonas](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonas](https://discuss.konghq.com/u/Jonas)\
**Post date:** [July 26, 2018, 7:24am UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/8 "2018-07-26T07:24:11Z")

</div>

today i have tried a new install in ubuntu16 with docker 18  
I put this commands:

docker run -d --name kong-database   
-p 9042:9042   
cassandra:3

docker run --rm   
–link kong-database:kong-database   
-e “KONG\_DATABASE=cassandra”   
-e “KONG\_PG\_HOST=kong-database”   
-e “KONG\_CASSANDRA\_CONTACT\_POINTS=kong-database”   
kong kong migrations up

/usuario# docker run -d --name kong --link kong-database:kong-database -e “KONG\_DATABASE=cassandra” -e “KONG\_CASSANDRA\_CONTACT\_POINTS=kong-database” -e “KONG\_PROXY\_ACCESS\_LOG=/dev/stdout” -e “KONG\_ADMIN\_ACCESS\_LOG=/dev/stdout” -e “KONG\_PROXY\_ERROR\_LOG=/dev/stderr” -e “KONG\_ADMIN\_ERROR\_LOG=/dev/stderr” -e “KONG\_ADMIN\_LISTEN=0.0.0.0:8001” -e “KONG\_ADMIN\_LISTEN\_SSL=0.0.0.0:8444” -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 kong

but kong container don’t start, and there isn’t logs with this command:  
docker logs kong

thanks

---

<div class="post-metadata">

**Author:** ![hutchic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hutchic/32/122_2.png) [@hutchic](https://discuss.konghq.com/u/hutchic)\
**Post date:** [July 30, 2018, 2:56pm UTC](https://discuss.konghq.com/t/i-cant-install-docker-kong-problem/1550/9 "2018-07-30T14:56:31Z")

</div>

A good docker debug step is to jump into the container:

You can start the kong container and hop into `/bin/sh` as follows:

> docker run -d --name kong-database -p 9042:9042 cassandra:3
> 
> docker run -it --rm --link kong-database:kong-database -e KONG\_PG\_HOST=kong-database -e KONG\_CASSANDRA\_CONTACT\_POINTS=kong-database -e KONG\_DATABASE=cassandra kong /bin/sh
> 
> kong migrations up
> 
> kong start

or in your example you could do the following

> docker exec -it kong /bin/sh

and then debug from there `ps aux` etc
