Skip to content

Commit c7289f7

Browse files
Daniel Seifbestlong
authored andcommitted
GNU parallel in workspace container (laradock#2102)
* added parallel workers * removed debug sleep * added documentation how to install GNU parallel
1 parent e8d84cf commit c7289f7

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

DOCUMENTATION/content/documentation/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,27 @@ To install FFMPEG in the Workspace container
17371737

17381738

17391739

1740+
<br>
1741+
<a name="Install-GNU-Parallel"></a>
1742+
## Install GNU Parallel
1743+
1744+
GNU Parallel is a command line tool to run multiple processes in parallel.
1745+
1746+
(see https://www.gnu.org/software/parallel/parallel_tutorial.html)
1747+
1748+
To install GNU Parallel in the Workspace container
1749+
1750+
1 - Open the `.env` file
1751+
1752+
2 - Search for the `WORKSPACE_INSTALL_GNU_PARALLEL` argument under the Workspace Container and set it to `true`
1753+
1754+
3 - Re-build the container `docker-compose build workspace`
1755+
1756+
1757+
1758+
1759+
1760+
17401761
<br>
17411762
<a name="Common-Aliases"></a>
17421763
<br>

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ services:
112112
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
113113
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
114114
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
115+
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
115116
volumes:
116117
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
117118
extra_hosts:

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ WORKSPACE_CHROME_DRIVER_VERSION=2.42
140140
WORKSPACE_TIMEZONE=UTC
141141
WORKSPACE_SSH_PORT=2222
142142
WORKSPACE_INSTALL_FFMPEG=false
143+
WORKSPACE_INSTALL_GNU_PARALLEL=false
143144

144145
### PHP_FPM ###############################################
145146

workspace/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,19 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
10021002
apt-get -y install ffmpeg \
10031003
;fi
10041004

1005+
###########################################################################
1006+
# GNU Parallel:
1007+
###########################################################################
1008+
1009+
USER root
1010+
1011+
ARG INSTALL_GNU_PARALLEL=false
1012+
1013+
RUN if [ ${INSTALL_GNU_PARALLEL} = true ]; then \
1014+
apt-get -y install parallel \
1015+
;fi
1016+
1017+
10051018
###########################################################################
10061019
# Check PHP version:
10071020
###########################################################################

0 commit comments

Comments
 (0)