2

I am a complete beginer when it comes to docker and I am trying to install a webserver aplication called steve via docker (https://github.com/RWTH-i5-IDSG/steve). I followed the instructions corectly, however when i use the command "*docker-compose up -d*", I get the folowing error:

ERROR: .IOError: [Errno 13] Permission denied: "./docker-compose.yml"

I am runing the latest version of ubuntu 18.04 and so far i have tried the folowing: -Using "sudo docker-compose up -d" (same error) - using "sudo docker build" (builds correctly but i still cant start it) -changing the permisions of both the dockerfile and docker-compose.yml to 777 - changing the file owner to root

The files are completly unchanged from the source code. I have only found a few users with this error who have posted an answer and none of them have worked so i am making my own question. I apologise for my bad English.

webprogrammer
  • 2,393
  • 3
  • 21
  • 27
aleskramzar
  • 31
  • 1
  • 1
  • 3
  • Does this answer your question? [How to fix docker: Got permission denied issue](https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue) – ggorlen Feb 17 '23 at 03:17

1 Answers1

14
  • When running a simple command like docker ps or docker run hello-world, Are you facing any issues? If the answer is yes, please do the following on your ubuntu environment.

    • Create a group (if it doesn't exist) - sudo groupadd docker
    • Add your user to the group - sudo gpasswd -a $USER docker
    • If using a server - you must log-out from your session and reconnect to the server.
    • Validate that it is working with docker run hello-world
Myzel394
  • 1,155
  • 3
  • 16
  • 40
Gabor Gyarmati
  • 187
  • 2
  • 10
  • 2
    Thank your for your replay. Docker has no issues with those comands and i also tried to add the user to the group but the issue persists. I tried some other commands and it seems only docker-compose comands have the error. – aleskramzar Feb 03 '20 at 08:36
  • 2
    Can you get more logs via `docker-compose logs -f` and post it here? I think it was already answered in https://stackoverflow.com/questions/53344380/errno-13-while-running-docker-compose-up. – Gabor Gyarmati Feb 03 '20 at 13:48
  • 2
    The solution in the comment from Feb 3 '20 worked, thanks a lot! – Jason Capriotti Jan 24 '21 at 14:46
  • 1
    Please note that adding a user to the docker group gives that user root privileges. See the warning here: https://docs.docker.com/engine/install/linux-postinstall/ – mibogo Mar 08 '21 at 19:20