From ca80dd169474c6994efc347eaf79cb3e8fee815e Mon Sep 17 00:00:00 2001 From: Artyom Mezin Date: Wed, 19 Jun 2019 12:21:28 +0300 Subject: [PATCH] Add laravel installer for root user (#2176) --- workspace/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4d405da9..3a07eee2 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -124,6 +124,10 @@ COPY ./auth.json /home/laradock/.composer/auth.json # Make sure that ~/.composer belongs to laradock 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 # Check if global install need to be ran @@ -715,6 +719,15 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ 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 ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}