From 4fbe5c03b972fedbe9e36df090cc12beb48c1e77 Mon Sep 17 00:00:00 2001 From: Claudio Ludovico <921500+ludo237@users.noreply.github.com> Date: Tue, 14 Jan 2020 16:06:25 +0100 Subject: [PATCH] Update Dockerfile Add non-root user for ffmpeg installation --- laravel-horizon/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 3c0509e..f627557 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -26,6 +26,15 @@ RUN apk --update add wget \ RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb +# Add a non-root user to help install ffmpeg: +ARG PUID=1000 +ENV PUID ${PUID} +ARG PGID=1000 +ENV PGID ${PGID} + +RUN addgroup -g ${PGID} laradock && \ + adduser -D -G laradock -u ${PUID} laradock + #Install BCMath package: ARG INSTALL_BCMATH=false RUN if [ ${INSTALL_BCMATH} = true ]; then \