Merge pull request #194 from Kauhat/fix-composer

Fix user permissions issue when installing Composer in the workspace container
This commit is contained in:
Mahmoud Zalt 2016-07-29 14:01:48 +03:00 committed by GitHub
commit f2615b9ff2

View File

@ -78,9 +78,14 @@ USER laradock
##################################### #####################################
# Add the composer.json # Add the composer.json
ADD ./composer.json /home/laradock/.composer/composer.json COPY ./composer.json /home/laradock/.composer/composer.json
# Check if global install need to be runned # Make sure that ~/.composer belongs to laradock
USER root
RUN chown -R laradock:laradock /home/laradock/.composer
USER laradock
# Check if global install need to be ran
ARG COMPOSER_GLOBAL_INSTALL=true ARG COMPOSER_GLOBAL_INSTALL=true
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL} ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \