2

I’m trying to deploy an dockerised app on Ubuntu and I have:

  • created a /var/www directory
  • made this directory 777
  • set the ownership to my deployer user
  • cloned my repo into /var/www/my-repo

When I run docker compose up --build I get file permission issue when copying the contents of my app directory to container. If I change the permissions in /var/www/my-repo to 777 I don’t get the error.

I don’t understand why. I've used my deployer user to clone the repo and it is part of the docker group, owns the /my-repo directory which is inside a publicly accessible directory. My questions are:

  • How can I fix this so I can run docker compose up -d without having to change the ownership of the repo?
  • Is changing the /var/www to publicly accessible a good idea?

I’m open to different setup suggestions.

PS: I'm also looking into using kubernets but it may be the next step

0 Answers0