Skip to content

Commit ca80dd1

Browse files
Artyom Mezinbestlong
authored andcommitted
Add laravel installer for root user (laradock#2176)
1 parent d1015e5 commit ca80dd1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

workspace/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ COPY ./auth.json /home/laradock/.composer/auth.json
124124
# Make sure that ~/.composer belongs to laradock
125125
RUN chown -R laradock:laradock /home/laradock/.composer
126126

127+
# Export composer vendor path
128+
RUN echo "" >> ~/.bashrc && \
129+
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
130+
127131
USER laradock
128132

129133
# Check if global install need to be ran
@@ -715,6 +719,15 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
715719

716720
USER laradock
717721

722+
ARG INSTALL_LARAVEL_INSTALLER=false
723+
724+
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
725+
# Install the Laravel Installer
726+
composer global require "laravel/installer" \
727+
;fi
728+
729+
USER root
730+
718731
ARG COMPOSER_REPO_PACKAGIST
719732
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
720733

0 commit comments

Comments
 (0)