1、安装docker
参考:centos7安装docker_代码手艺人老羊的博客-CSDN博客
2、下载包(从github)
# Download the Docker image of Apache APISIX
git clone https://github.com/apache/apisix-docker.git
3、安装
# Switch the current directory to the apisix-docker/example path
cd apisix-docker/example
# Run the docker-compose command to install Apache APISIX
docker-compose -p docker-apisix up -d
4、出现问题
4.1、解决 docker-compose command not found
解决办法:
安装docker-compose
建议用yum安装吧,pip就算了吧,感觉麻烦
yum install docker-compose
4.2、连接超时
ERROR: error pulling image configuration: Get https://registry-1.docker.io/v2/apache/apisix/blobs/sha256:33c83be62a8c60693f8ee7ed0e9d5b759a39d445ee0daf2f01a9614b3c01511a: net/http: TLS handshake timeout
解决办法:
更改docker镜像地址:如用网易、阿里云、docker中国镜像等
vim /etc/docker/daemon.json
如果没有,就新建一个daemon.json添加内容
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}