| commit | a60416e3dfcc2bf710e106c6e0e44e0d01e04153 | [log] [tgz] |
|---|---|---|
| author | ShaoBo Wan(无极) <756684177@qq.com> | Wed Oct 23 15:42:35 2019 +0800 |
| committer | WenMing <moonbingbing@gmail.com> | Wed Oct 23 15:42:35 2019 +0800 |
| tree | 5fc84573237530ee7c4d5ada67f8a89b1c04b739 | |
| parent | ee7c5e7ab71723d643d6b69c83dba65908f3f02b [diff] |
add etcd config file and Run etcd server example. (#24)
You can install multiple versions of APISIX through docker:
docker build -t apisix:master-alpine -f alpine/Dockerfile alpine
docker build -t apisix:0.8-alpine --build-arg APISIX_VERSION=0.8 -f alpine/Dockerfile alpine
docker run -it --name etcd-server \ -v ./example/etcd_conf/etcd.conf.yml:/opt/bitnami/etcd/conf/etcd.conf.yml \ -p 2379:2379 \ -p 2380:2380 \ --env ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd:3.3.13-r80
windows systems use absolute paths to hang in the configuration file
eg:
-v /e/github/docker-apisix/example/etcd_conf/etcd.conf.yml:/opt/bitnami/etcd/conf/etcd.conf.yml
You need etcd docker to work with APISIX. You can refer to the docker-compose example.
Or you can run APISIX with Docker directly(Docker name is test-api-gateway):
docker run --name test-api-gateway \ -v ./example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml \ -v ./example/apisix_log:/usr/local/apisix/logs \ -p 8080:9080 \ -p 8083:9443 \ -d iresty/apisix
NOTE: macOS not supports host network mode, so Linux is recommended.