2

I'm running docker with apache2. When doing docker-compose up -d it needs 777 permission to var/lib directory. If I give 777 permission then docker start but the same movement other application like Skype, sublime won't able to start and give an error like

cannot open cookie file /var/lib/snapd/cookie/snap.sublime-text /var/lib/snapd has 'other' write 40777

so here the problem is sublime need 755 permission but docker need 777 permission

Also, one of snaps file of docker is also available inside /var/lib/snapd/snaps

Due to this problem, I'm not able to simultaneously use docker and other application

My 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
7
  • What are you trying to do that it needs 777 permission? Also can you post your compose file? Commented Dec 7, 2018 at 6:55
  • @SvenHakvoort I have added compose file Commented Dec 7, 2018 at 8:50
  • Do you get an error when using the default permissions? Also you say If I give 777 permission, on what folder do you apply these settings and where? Commented Dec 7, 2018 at 8:52
  • Here is the screenshot of error clb.sh/ff798f If i give 777 permission to var/lib/* then docker start working but other application stop working Commented Dec 7, 2018 at 11:42
  • Correct me if I am wrong, but isn't this error about /var/www and not /var/lib? Commented Dec 7, 2018 at 12:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.