| commit | a9b25f2857c5cca4daa2422d95a50ac921aa97ed | [log] [tgz] |
|---|---|---|
| author | Wen Ming <moonbingbing@gmail.com> | Tue Jun 16 17:45:27 2020 +0800 |
| committer | GitHub <noreply@github.com> | Tue Jun 16 17:45:27 2020 +0800 |
| tree | 816aa8d461e9bc7e24a60aeb9359aeeb08b6dca3 | |
| parent | f4cdbf9387a8e47b87a95c08089aef3539dfc4c1 [diff] |
add dir for master dev branch. (#57)
Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the source.
# Assign Apache release version number to variable `APISIX_VERSION`, for example: 1.2 . The latest version can be find at `https://github.com/apache/incubator-apisix/releases`
APISIX_VERSION=1.2
docker build -t apisix:${APISIX_VERSION}-alpine --build-arg APISIX_VERSION=${APISIX_VERSION} -f alpine/Dockerfile alpine
docker build -t apisix:master-alpine -f alpine/Dockerfile alpine
apisixdocker network create \ --driver=bridge \ --subnet=172.18.0.0/16 \ --ip-range=172.18.5.0/24 \ --gateway=172.18.5.254 \ apisix
apisix networkSpecify ip 172.18.5.10
docker run -it --name etcd-server \ -v `pwd`/example/etcd_conf/etcd.conf.yml:/opt/bitnami/etcd/conf/etcd.conf.yml \ -p 2379:2379 \ -p 2380:2380 \ --network apisix \ --ip 172.18.5.10 \ --env ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd:3.3.13-r80
Note:
- windows OS use absolute paths to hang in the configuration file.
- e.g:windows dir path
E:\GitHub\docker-apisix,configuration file hang path is-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 Apache APISIX. You can refer to the docker-compose example.
Or you can run APISIX with Docker directly(Docker name is test-api-gateway):
Check or Modify etcd address to http: //172.18.5.10:2379 in pwd / example / apisix_conf / config.yaml: /usr/local/apisix/conf/config.yaml
docker run --name test-api-gateway \ -v `pwd`/example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml \ -v `pwd`/example/apisix_log:/usr/local/apisix/logs \ -p 9080:9080 \ -p 9443:9443 \ --network apisix \ --ip 172.18.5.11 \ -d apache/apisix
Note:
- windows OS use absolute paths to hang in the configuration file and log dir.
Test with admin api
e.g. Get route list, should be return
curl http://127.0.0.1:9080/apisix/admin/routes/
...
{"node":{"createdIndex":4,"modifiedIndex":4,"key":"\/apisix\/routes","dir":true},"action":"get"}
docker rm test-api-gateway docker rm etcd-server docker network rm apisix