Permission problems installing into centos7 docker image

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:

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 :wink: