Skip to content

Commit 58d7d4f

Browse files
ahkuibestlong
authored andcommitted
add powerline to workspace (laradock#2062)
1 parent 1f22e86 commit 58d7d4f

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

DOCUMENTATION/content/documentation/index.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,12 @@ docker-compose up -d metabase
631631

632632
1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`.
633633

634-
2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping)
634+
2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping)
635635

636636
3) Authenticate from the web app.
637637

638638
- Default username is `admin`.
639-
- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`.
639+
- Default password is `docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword`.
640640

641641
(To enter container as root type `docker-compose exec --user root jenkins bash`).
642642

@@ -1289,6 +1289,21 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
12891289

12901290

12911291

1292+
<br>
1293+
<a name="Install-Powerline"></a>
1294+
## Install Powerline
1295+
1296+
1 - Open the `.env` file and set `WORKSPACE_INSTALL_POWERLINE` and `WORKSPACE_INSTALL_PYTHON` to `true`.
1297+
1298+
2 - Run `docker-compose build workspace`, after the step above.
1299+
1300+
Powerline is required python
1301+
1302+
1303+
1304+
1305+
1306+
12921307
<br>
12931308
<a name="Install-Symfony"></a>
12941309
## Install Symfony
@@ -2104,7 +2119,7 @@ This error sometimes happens because your Laravel application isn't running on t
21042119

21052120
## I get stuck when building nginx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
21062121

2107-
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-419652646), Already fixed,just set `CHANGE_SOURCE` to false.
2122+
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-419652646), Already fixed,just set `CHANGE_SOURCE` to false.
21082123

21092124
## Custom composer repo packagist url and npm registry url
21102125

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ services:
108108
- TZ=${WORKSPACE_TIMEZONE}
109109
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
110110
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
111+
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
111112
volumes:
112113
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
113114
extra_hosts:

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ WORKSPACE_INSTALL_LINUXBREW=false
121121
WORKSPACE_INSTALL_MC=false
122122
WORKSPACE_INSTALL_SYMFONY=false
123123
WORKSPACE_INSTALL_PYTHON=false
124+
WORKSPACE_INSTALL_POWERLINE=false
124125
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
125126
WORKSPACE_INSTALL_IMAGEMAGICK=false
126127
WORKSPACE_INSTALL_TERRAFORM=false

workspace/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,23 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
871871
&& python -m pip install --upgrade virtualenv \
872872
;fi
873873

874+
###########################################################################
875+
# POWERLINE:
876+
###########################################################################
877+
878+
USER root
879+
ARG INSTALL_POWERLINE=false
880+
881+
RUN if [ ${INSTALL_POWERLINE} = true ]; then \
882+
if [ ${INSTALL_PYTHON} = true ]; then \
883+
python -m pip install --upgrade powerline-status && \
884+
echo "" >> /etc/bash.bashrc && \
885+
echo ". /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh" >> /etc/bash.bashrc \
886+
;fi \
887+
;fi
888+
889+
USER laradock
890+
874891
###########################################################################
875892
# ImageMagick:
876893
###########################################################################

0 commit comments

Comments
 (0)