我正在用apache2运行docker。执行docker-compose up -d时,它需要777权限才能访问var / lib目录。如果我给777权限,则docker启动,但是同一动作的其他应用程序(例如Skype),sublime将无法启动并给出类似错误
无法打开cookie文件/var/lib/snapd/cookie/snap.sublime-text / var / lib / snapd具有“ other”字样40777
所以这里的问题是崇高需要755权限,而docker需要777权限
此外,在/ var / lib / snapd / snaps中也可以使用docker的snaps文件之一
由于这个问题,我无法同时使用docker和其他应用程序
我的docker-compose.yml
version: "3"
services:
app:
image: markoshust/magento-nginx:1.13
ports:
- 80:8000
links:
- db
- phpfpm
- redis
- elasticsearch
volumes:
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf
- .:/var/www/html:delegated
- ~/.composer:/var/www/.composer:delegated
- sockdata:/sock
phpfpm:
image: markoshust/magento-php:7.1-fpm
links:
- db
volumes:
- ./.docker/php.ini:/usr/local/etc/php/php.ini
- .:/var/www/html:delegated
- ~/.composer:/var/www/.composer:delegated
- sockdata:/sock
db:
image: percona:5.7
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=test
- MYSQL_USER=test
- MYSQL_PASSWORD=test
volumes:
- dbdata:/var/lib/mysql
redis:
image: redis:3.0
elasticsearch:
image: elasticsearch:5.2
volumes:
- esdata:/usr/share/elasticsearch/data
volumes:
dbdata:
sockdata:
esdata:
# Mark Shust's Docker Configuration for Magento
(https://github.com/markoshust/docker-magento)
# Version 12.0.0