pixeldin commented on issue #8646:
URL: https://github.com/apache/apisix/issues/8646#issuecomment-1382131522

   ## Some reason
   Hi,community! This problem also occurs in my environment(ubuntu 22.04), 
after struggling for long time trying to figure out what is the problem, most 
of the solution I found pointed to mutual access permission issues between 
docker containers and your OS mounted filesystems. 
   
   ## Solution refer to safe policy
   - @mscb402 If your machine supports SELinux command, such as (CentOS), maybe 
you can try update the access policy by `setenforce 0` temporarily. 
   - In my environment,since the ubuntu system adopts the `AppArmor` to 
management file security access mode, some way for reference only is replace 
policy manager way with SELinux and I think that is a little complicated.
   https://www.linode.com/docs/guides/how-to-install-selinux-on-ubuntu-22-04/
   
   ## Perhaps a less elegant way
   Finally, it somehow works in my env, my solution steps are:
   - First I change the docker-compose.yml configuration like this:
     ```
     apisix:
       image: apache/apisix:latest
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         - ./apisix_conf/nginx.conf:/usr/local/apisix/conf/nginx.conf
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
         - ./apisix_client_body_temp:/usr/local/apisix/client_body_temp
         - ./apisix_proxy_temp:/usr/local/apisix/proxy_temp
     ```
     **I found the file volumes list above will be initialized by apisix 
startup in the docker's running log.**
   
   - And then pre-create them into your file location(like 
`apisix-docker/example/`) before the container starts.
   
   Maybe this is not a best solution, if anyone have a better idea, I hope to 
get your advice.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to