Add laravel installer for root user (#2176)
This commit is contained in:
parent
d1015e5e96
commit
ca80dd1694
|
@ -124,6 +124,10 @@ COPY ./auth.json /home/laradock/.composer/auth.json
|
||||||
# Make sure that ~/.composer belongs to laradock
|
# Make sure that ~/.composer belongs to laradock
|
||||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||||
|
|
||||||
|
# Export composer vendor path
|
||||||
|
RUN echo "" >> ~/.bashrc && \
|
||||||
|
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
# Check if global install need to be ran
|
# Check if global install need to be ran
|
||||||
|
@ -715,6 +719,15 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
|
ARG INSTALL_LARAVEL_INSTALLER=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \
|
||||||
|
# Install the Laravel Installer
|
||||||
|
composer global require "laravel/installer" \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
ARG COMPOSER_REPO_PACKAGIST
|
ARG COMPOSER_REPO_PACKAGIST
|
||||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue