Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Permission problems installing into centos7 docker image

Started by Jeff 9 years ago · 0 replies · 1536 views
9 years ago

Hey guys,

This isn't a problem per say since I already found the answer to my problem. But I thought I should contribute it here so that others that might run across the same problem will find a reference to it.

While trying to build an image for our production images based on the cents:7 docker base image, I got 'permission denied' when the composer was running the post install commands. The permission denied was happening when the "bin/grav install" command was attempted. Turns out the permissions on the files in the bin directory were not allowing execution. Here is a sample from my docker build:

Generating autoload files
> bin/grav install
sh: bin/grav: Permission denied
Script bin/grav install handling the post-create-project-cmd event returned with error code 126
The command '/bin/sh -c php composer.phar create-project getgrav/grav /webroot/grav 1.3.10' returned a non-zero code: 126

After searching for a while without much luck, I found an unrelated article explaining a problem related to php+zip decompression that could cause permissions to be wrong. This link provided the hint:

https://github.com/composer/composer/issues/4471

I added a docker step to install unzip thru yum and voila it works. My docker build now installs cleanly with grav installing thru the composer properly.

Now on to the next steps ;-)

Jeff

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by motorambler, 1 month ago
9 677 3 weeks ago
Installation & Hosting · by jeremycherfas, 1 month ago
1 334 1 month ago
Installation & Hosting · by antoinep, 4 months ago
8 1161 4 months ago
Installation & Hosting · by Jürgen Dietrich, 10 months ago
0 800 10 months ago
Installation & Hosting · by rappluk, 12 months ago
0 834 12 months ago