From 8e84fbbec2bb18980758bdd435175512e2e127a3 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Mon, 7 Aug 2017 12:36:02 +0300 Subject: [PATCH] add missing symfony and python to workspace and remove useless alias --- workspace/Dockerfile-56 | 43 +++++++++++++++++++++++++++++++++-------- workspace/Dockerfile-70 | 34 +++++++++++++------------------- workspace/Dockerfile-71 | 42 +++++++++++++++++++++++----------------- 3 files changed, 72 insertions(+), 47 deletions(-) diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index d844b39..a3292e9 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -319,14 +319,6 @@ USER laradock RUN echo "" >> ~/.bashrc && \ echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc -##################################### -# Laravel Artisan Alias -##################################### -USER root - -RUN echo "" >> ~/.bashrc && \ - echo 'alias art="php artisan"' >> ~/.bashrc - ##################################### # Laravel Envoy: ##################################### @@ -442,6 +434,41 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ USER laradock +##################################### +# Symfony: +##################################### +USER root +ARG INSTALL_SYMFONY=false +ENV INSTALL_SYMFONY ${INSTALL_SYMFONY} +RUN if [ ${INSTALL_SYMFONY} = true ]; then \ + + mkdir -p /usr/local/bin \ + && curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \ + && chmod a+x /usr/local/bin/symfony \ + + # Symfony 3 alias + && echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \ + && echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \ + + # Symfony 2 alias + # && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \ + # && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \ + +;fi + +##################################### +# PYTHON: +##################################### + +ARG INSTALL_PYTHON=false +ENV INSTALL_PYTHON ${INSTALL_PYTHON} +RUN if [ ${INSTALL_PYTHON} = true ]; then \ + apt-get update \ + && apt-get -y install python python-pip python-dev build-essential \ + && pip install --upgrade pip \ + && pip install --upgrade virtualenv \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index d368563..c6c4e38 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -336,14 +336,6 @@ USER laradock RUN echo "" >> ~/.bashrc && \ echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc -##################################### -# Laravel Artisan Alias -##################################### -USER root - -RUN echo "" >> ~/.bashrc && \ - echo 'alias art="php artisan"' >> ~/.bashrc - ##################################### # Laravel Envoy: ##################################### @@ -510,6 +502,19 @@ RUN if [ ${INSTALL_MC} = true ]; then\ chmod +x /usr/local/bin/mc \ ;fi +##################################### +# Image optimizers: +##################################### +USER root +ARG INSTALL_IMAGE_OPTIMIZERS=false +ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS} +RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ + apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \ + if [ ${INSTALL_NODE} = true ]; then \ + . ~/.bashrc && npm install -g svgo \ + ;fi\ +;fi + ##################################### # Symfony: ##################################### @@ -532,19 +537,6 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \ ;fi -##################################### -# Image optimizers: -##################################### -USER root -ARG INSTALL_IMAGE_OPTIMIZERS=false -ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS} -RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ - apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \ - if [ ${INSTALL_NODE} = true ]; then \ - . ~/.bashrc && npm install -g svgo \ - ;fi\ -;fi - ##################################### # PYTHON: ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 350bb62..5a39096 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -337,14 +337,6 @@ USER laradock RUN echo "" >> ~/.bashrc && \ echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc -##################################### -# Laravel Artisan Alias -##################################### -USER root - -RUN echo "" >> ~/.bashrc && \ - echo 'alias art="php artisan"' >> ~/.bashrc - ##################################### # Laravel Envoy: ##################################### @@ -513,6 +505,21 @@ RUN if [ ${INSTALL_MC} = true ]; then\ chmod +x /usr/local/bin/mc \ ;fi +##################################### +# Image optimizers: +##################################### +USER root +ARG INSTALL_IMAGE_OPTIMIZERS=false +ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS} +RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ + apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \ + if [ ${INSTALL_NODE} = true ]; then \ + . ~/.bashrc && npm install -g svgo \ + ;fi\ +;fi + +USER laradock + ##################################### # Symfony: ##################################### @@ -536,19 +543,18 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \ ;fi ##################################### -# Image optimizers: +# PYTHON: ##################################### -USER root -ARG INSTALL_IMAGE_OPTIMIZERS=false -ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS} -RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ - apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \ - if [ ${INSTALL_NODE} = true ]; then \ - . ~/.bashrc && npm install -g svgo \ - ;fi\ + +ARG INSTALL_PYTHON=false +ENV INSTALL_PYTHON ${INSTALL_PYTHON} +RUN if [ ${INSTALL_PYTHON} = true ]; then \ + apt-get update \ + && apt-get -y install python python-pip python-dev build-essential \ + && pip install --upgrade pip \ + && pip install --upgrade virtualenv \ ;fi -USER laradock # #--------------------------------------------------------------------------