0

I intended to use Laravel and I wanted to use laradock. After some successful setup processes.

I meant to run docker-compose up but I got this error

Building ide-theia
Step 1/3 : FROM theiaide/theia
 ---> 40a7b9da8cae
Step 2/3 : LABEL maintainer="ahkui <ahkui@outlook.com>"
 ---> Using cache
 ---> d9d45043f719
Step 3/3 : RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf
 ---> Running in 4dd5bcc59773
/bin/sh: can't create /etc/sysctl.conf: Permission denied
ERROR: Service 'ide-theia' failed to build: The command '/bin/sh -c echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf' returned a non-zero code: 1

I didn't know why. No matter I used sudo or didn't, the error still appeared.

fsevenm
  • 791
  • 8
  • 19

2 Answers2

1

I've just got the way to fix it. Go to Laradock folder > ide-theia > Dockerfile. Add this command

USER root

before this command

RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf

Save it, try to run docker-compose up again.

See this issue fixed at https://github.com/laradock/laradock/commit/df49e2fd83c15cb11691b03673f5d432a8cbafd6?fbclid=IwAR2z2z0EfOdP6bVd-ZIRIkE158HfKxXrB9pdNwqD0NYD9B7tRY3rKMCaDEA

fsevenm
  • 791
  • 8
  • 19
0

This is a known & fixed Laradock issue.
You should update Laradock.

Laurens Deprost
  • 1,653
  • 5
  • 16
  • Sure. I just didn't know why. This was new laradock installation. I did it last night. I got this issue addressed at https://github.com/laradock/laradock/issues/1841?fbclid=IwAR2tbJvtlW_l-nsfl22HvOFtJjfHobzUVffLBAqbkYIems5jBglJVQHehCA. And now the error is gone. – fsevenm Dec 31 '18 at 22:57