Git Product home page Git Product logo

Comments (2)

petehalverson avatar petehalverson commented on July 19, 2024

I'm guessing it's a typo, but using - ./.env:/var/www/html.env would mount that file as /var/www/html.env in the container.

Regardless, check the permissions of the .env file on your local machine which you're mounting in the container. Permissions on mounted volumes will be the same both inside and outside of the container. If it's set as root it will be root in the container. If you change it to www-data, it will be www-data in the container.

I should note, if the local file you referenced in docker-compose.yml doesn't exist when you run docker-compose up, the container will create a folder on your local machine with the root user.

from docker-octobercms.

petehalverson avatar petehalverson commented on July 19, 2024

If you don't have a www-data:www-data user:group setup in OS X, what I described above doesn't really fly.

However, Docker For Mac does something interesting. If you update the file's permissions from within the container, it's permissions persist on the host as an extended attribute ls -@la .env

https://docs.docker.com/docker-for-mac/osxfs/#ownership

from docker-octobercms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.