Fix user permissions issue when installing Composer in the workspace

container
This commit is contained in:
Jack Fletcher 2016-07-29 09:59:12 +01:00
parent c5ac8d1ada
commit 42d551dead

View File

@ -78,9 +78,14 @@ USER laradock
#####################################
# 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
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \