Skip to content

Commit 42d551d

Browse files
committed
Fix user permissions issue when installing Composer in the workspace
container
1 parent c5ac8d1 commit 42d551d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

workspace/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,14 @@ USER laradock
7878
#####################################
7979

8080
# Add the composer.json
81-
ADD ./composer.json /home/laradock/.composer/composer.json
81+
COPY ./composer.json /home/laradock/.composer/composer.json
8282

83-
# Check if global install need to be runned
83+
# Make sure that ~/.composer belongs to laradock
84+
USER root
85+
RUN chown -R laradock:laradock /home/laradock/.composer
86+
USER laradock
87+
88+
# Check if global install need to be ran
8489
ARG COMPOSER_GLOBAL_INSTALL=true
8590
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
8691
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \

0 commit comments

Comments
 (0)