Skip to content

Commit 4417083

Browse files
toondaeybestlong
authored andcommitted
Installation of ffmpeg (laradock#2118)
* Install ffmpeg in workspace and php-worker.
1 parent 0980523 commit 4417083

5 files changed

Lines changed: 27 additions & 0 deletions

File tree

DOCUMENTATION/content/documentation/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,10 @@ To install FFMPEG in the Workspace container
17281728

17291729
3 - Re-build the container `docker-compose build workspace`
17301730

1731+
4 - If you use the `php-worker` container too, please follow the same steps above especially if you have conversions that have been queued.
1732+
1733+
**PS** Don't forget to install the binary in the `php-fpm` container too by applying the same steps above to its container, otherwise the you'll get an error when running the `php-ffmpeg` binary.
1734+
17311735

17321736

17331737

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ services:
172172
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
173173
- INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT}
174174
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
175+
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
175176
volumes:
176177
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
177178
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
@@ -206,6 +207,7 @@ services:
206207
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
207208
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
208209
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
210+
- INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG}
209211
- PUID=${PHP_WORKER_PUID}
210212
- PGID=${PHP_WORKER_PGID}
211213
volumes:

env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ PHP_FPM_INSTALL_APCU=false
180180
PHP_FPM_INSTALL_YAML=false
181181
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
182182
PHP_FPM_INSTALL_MYSQL_CLIENT=false
183+
PHP_FPM_FFMPEG=false
183184
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
184185

185186
### PHP_WORKER ############################################
@@ -193,6 +194,7 @@ PHP_WORKER_INSTALL_MYSQL_CLIENT=false
193194
PHP_WORKER_INSTALL_AMQP=false
194195
PHP_WORKER_INSTALL_GHOSTSCRIPT=false
195196
PHP_WORKER_INSTALL_SWOOLE=false
197+
PHP_WORKER_INSTALL_FFMPEG=false
196198
PHP_WORKER_PUID=1000
197199
PHP_WORKER_PGID=1000
198200

php-fpm/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,19 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
643643
apt-get -y install mysql-client \
644644
;fi
645645

646+
###########################################################################
647+
# FFMPEG:
648+
###########################################################################
649+
650+
USER root
651+
652+
ARG INSTALL_FFMPEG=false
653+
654+
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
655+
apt-get update -yqq && \
656+
apt-get -y install ffmpeg \
657+
;fi
658+
646659
###########################################################################
647660
# Check PHP version:
648661
###########################################################################

php-worker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
6969
apk --update add mysql-client \
7070
;fi
7171

72+
# Install FFMPEG:
73+
ARG INSTALL_FFMPEG=false
74+
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
75+
apk --update add ffmpeg \
76+
;fi
77+
7278
# Install AMQP:
7379
ARG INSTALL_AMQP=false
7480

0 commit comments

Comments
 (0)