apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

help: can't install using docker

Open Cheol-Soon-Choi opened this issue 2 years ago • 6 comments

Issue description

I tried to install according to the referenced documentation(https://apisix.apache.org/docs/dashboard/install/), but it failed. Is there something wrong with my configuration environment or step?

Expected behavior

docker run dashboard

How to Reproduce

doc: https://apisix.apache.org/docs/dashboard/install/

  1. docker pull apache/apisix-dashboard:2.13-alpine
  2. docker run -d --name dashboard
    -p 9000:9000
    -v my_config_path:/usr/local/apisix-dashboard/conf/conf.yaml
    apache/apisix-dashboard

Screenshots

스크린샷 2022-10-14 오전 11 42 09

Environment

  • apisix version (cmd: apisix version): 2.15.0
  • OS (cmd: uname -a): ubuntu
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): openresty/1.21.4.1
  • etcd version, if have (cmd: run etcd --version): 3.4.18
  • apisix-dashboard version, if have: 2.13
  • Browser version, if have:

Additional context

No response

Cheol-Soon-Choi avatar Oct 14 '22 06:10 Cheol-Soon-Choi

Hi @Cheol-Soon-Choi, can you share your configuration file? Also, make sure that your etcd is appropriately available.

Baoyuantop avatar Oct 17 '22 01:10 Baoyuantop

Hi @Cheol-Soon-Choi, can you share your configuration file? Also, make sure that your etcd is appropriately available.

my confing.yaml : conf: listen: host: 0.0.0.0 port: 9000 allow_list: - 0.0.0.0/0

etcd : 스크린샷 2022-10-17 오전 11 59 48

my step is : I installed apisix (2.15) through the source code according to the reference(https://apisix.apache.org/docs/apisix/2.15/installation-guide/), and installed etcd. apisix is running with the "apisix start" command.

Q1. Do I need to override all items by referring to default-config? I understand that it is enough to override only the parts that need customization. Q2. Should I additionally check etcd? (if yes, how?)

Since I am a newbie, I would be very grateful if you could explain it in an easy way. Thank you in advance. @Baoyuantop

Cheol-Soon-Choi avatar Oct 17 '22 03:10 Cheol-Soon-Choi

Do I need to override all items by referring to default-config? I understand that it is enough to override only the parts that need customization.

Do you mean the apisix configuration file? If yes, define only what you need. What you don't have will use the default configuration. You can refer to https://apisix.apache.org/docs/apisix/installation-guide/#configuring-apisix

Should I additionally check etcd? (if yes, how?)

It would help if you ensured that the etcd address is configured in the conf.yaml file of apisix-dashboard is available, is your etcd also deployed using docker?

Baoyuantop avatar Oct 17 '22 06:10 Baoyuantop

Do you mean the apisix configuration file? If yes, define only what you need. What you don't have will use the default configuration. You can refer to https://apisix.apache.org/docs/apisix/installation-guide/#configuring-apisix

i mean my dashboard config file, not apisix config file. I created my dashboard config file.yaml by referring to this file(https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml) Do I have to write everything to my dashboard config file like a reference file? or can I write only the necessary parts like the apisix config file?

It would help if you ensured that the etcd address is configured in the conf.yaml file of apisix-dashboard is available, is your etcd also deployed using docker?

For etcd, I just installed it according to doc(https://apisix.apache.org/docs/apisix/installation-guide/). Not docker. Do I need to take further action?

Cheol-Soon-Choi avatar Oct 17 '22 08:10 Cheol-Soon-Choi

Finally, I implemented my dashboard-config file. Please review. @Baoyuantop I configured my dashboard config file by referring to this file(https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml)

스크린샷 2022-10-17 오후 5 13 57

after that, docker run -d --name dashboard -p 8080:9000 -v /home/ccsqpt/tmp/install/dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml apache/apisix-dashboard:2.13-alpine

i got another error logs 스크린샷 2022-10-17 오후 5 19 34

I appreciate you commenting. thanks

Cheol-Soon-Choi avatar Oct 17 '22 08:10 Cheol-Soon-Choi

It looks like because your apisix-dashboard is running in docker and etcd is running in the host, the containers in docker and the server in the host cannot use 127.0.0.1:2379 communication directly. You need to solve this problem by searching. You can also try using https://github.com/apache/apisix-docker/tree/master/example to launch all components quickly.

Baoyuantop avatar Oct 17 '22 08:10 Baoyuantop

Feeling free to reopen if you still have the problem.

LiteSun avatar Dec 05 '22 01:12 LiteSun