Skip to content

Apache APISIX Container gets restarting when using Docker Compose #262

@haoren22

Description

@haoren22

基于docker compose 安装apisix 存在镜像重启问题
[root@localhost /]# mkdir apisix
[root@localhost /]# cd apisix/
[root@localhost apisix]# git clone https://github.com/apache/apisix-docker.git
[root@localhost apisix]# cd apisix-docker/example/
[root@localhost example]# docker-compose -p docker-apisix up -d
上面是执行的命令
结果,就是存在重启问题
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ce03e3dede8 apache/apisix:2.11.0-alpine "sh -c '/usr/bin/a..." About a minute ago Restarting (1) 39 seconds ago dockerapisix_apisix_1
2f9038d87f78 nginx:1.19.0-alpine "/docker-entrypoin..." About a minute ago Restarting (1) 41 seconds ago dockerapisix_web1_1

将镜像删除之后
我试着将example的权限改为777,情况还是一样的
[root@localhost apisix-docker]# chmod -R 777 example

这个是具体的容器报错信息
/usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init
failed to read local yaml config of apisix: failed to open file: /usr/local/apisix/conf/config.yaml, error info:/usr/local/apisix/conf/config.yaml: Permission denied
/usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions