Skip to content

Commit 1f22e86

Browse files
liyu001989bestlong
authored andcommitted
workspace add inotify and fswatch (laradock#2059)
1 parent c8b526b commit 1f22e86

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ WORKSPACE_INSTALL_SWOOLE=false
131131
WORKSPACE_INSTALL_LIBPNG=false
132132
WORKSPACE_INSTALL_IONCUBE=false
133133
WORKSPACE_INSTALL_MYSQL_CLIENT=false
134+
WORKSPACE_INSTALL_INOTIFY=false
135+
WORKSPACE_INSTALL_FSWATCH=false
134136
WORKSPACE_PUID=1000
135137
WORKSPACE_PGID=1000
136138
WORKSPACE_CHROME_DRIVER_VERSION=2.42

workspace/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,31 @@ RUN if [ ${INSTALL_LIBPNG} = true ]; then \
446446
apt-get install libpng16-16 \
447447
;fi
448448

449+
###########################################################################
450+
# Inotify EXTENSION:
451+
###########################################################################
452+
453+
ARG INSTALL_INOTIFY=false
454+
455+
RUN if [ ${INSTALL_INOTIFY} = true ]; then \
456+
pecl -q install inotify && \
457+
echo "extension=inotify.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/inotify.ini && \
458+
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/inotify.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-inotify.ini \
459+
;fi
460+
461+
###########################################################################
462+
# fswatch
463+
###########################################################################
464+
465+
ARG INSTALL_FSWATCH=false
466+
467+
RUN if [ ${INSTALL_FSWATCH} = true ]; then \
468+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 47FE03C1 \
469+
&& add-apt-repository -y ppa:hadret/fswatch \
470+
|| apt-get update -yqq \
471+
&& apt-get -y install fswatch \
472+
;fi
473+
449474
###########################################################################
450475
# IonCube Loader
451476
###########################################################################

0 commit comments

Comments
 (0)