add powerline to workspace (#2062)

This commit is contained in:
ahkui 2019-03-28 09:54:51 +08:00 committed by Shao Yu-Lung (Allen)
parent 1f22e86d92
commit 58d7d4fa0b
4 changed files with 37 additions and 3 deletions

View File

@ -1289,6 +1289,21 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
<br>
<a name="Install-Powerline"></a>
## Install Powerline
1 - Open the `.env` file and set `WORKSPACE_INSTALL_POWERLINE` and `WORKSPACE_INSTALL_PYTHON` to `true`.
2 - Run `docker-compose build workspace`, after the step above.
Powerline is required python
<br> <br>
<a name="Install-Symfony"></a> <a name="Install-Symfony"></a>
## Install Symfony ## Install Symfony

View File

@ -108,6 +108,7 @@ services:
- TZ=${WORKSPACE_TIMEZONE} - TZ=${WORKSPACE_TIMEZONE}
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID} - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN} - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
volumes: volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
extra_hosts: extra_hosts:

View File

@ -121,6 +121,7 @@ WORKSPACE_INSTALL_LINUXBREW=false
WORKSPACE_INSTALL_MC=false WORKSPACE_INSTALL_MC=false
WORKSPACE_INSTALL_SYMFONY=false WORKSPACE_INSTALL_SYMFONY=false
WORKSPACE_INSTALL_PYTHON=false WORKSPACE_INSTALL_PYTHON=false
WORKSPACE_INSTALL_POWERLINE=false
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
WORKSPACE_INSTALL_IMAGEMAGICK=false WORKSPACE_INSTALL_IMAGEMAGICK=false
WORKSPACE_INSTALL_TERRAFORM=false WORKSPACE_INSTALL_TERRAFORM=false

View File

@ -871,6 +871,23 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
&& python -m pip install --upgrade virtualenv \ && python -m pip install --upgrade virtualenv \
;fi ;fi
###########################################################################
# POWERLINE:
###########################################################################
USER root
ARG INSTALL_POWERLINE=false
RUN if [ ${INSTALL_POWERLINE} = true ]; then \
if [ ${INSTALL_PYTHON} = true ]; then \
python -m pip install --upgrade powerline-status && \
echo "" >> /etc/bash.bashrc && \
echo ". /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh" >> /etc/bash.bashrc \
;fi \
;fi
USER laradock
########################################################################### ###########################################################################
# ImageMagick: # ImageMagick:
########################################################################### ###########################################################################