Created
August 26, 2024 05:54
-
-
Save kszyrvercobrador/5f3edfc855971e784d69ac468193d1ff to your computer and use it in GitHub Desktop.
php7.4 laravel docker file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.4-fpm-alpine | |
RUN apk add --no-cache --virtual .deps \ | |
git \ | |
icu-libs \ | |
zlib \ | |
openssh \ | |
imagemagick \ | |
imagemagick-libs \ | |
imagemagick-dev \ | |
freetype \ | |
libpng \ | |
libjpeg-turbo \ | |
libxslt | |
RUN set -xe \ | |
&& apk add --no-cache --virtual .build-deps \ | |
$PHPIZE_DEPS \ | |
freetype-dev \ | |
libpng-dev \ | |
libjpeg-turbo-dev \ | |
libxslt-dev \ | |
icu-dev \ | |
zlib-dev \ | |
libzip-dev \ | |
gmp-dev \ | |
&& docker-php-ext-configure gd \ | |
--with-freetype \ | |
--with-jpeg \ | |
&& docker-php-ext-install -j$(nproc) \ | |
intl \ | |
pdo \ | |
soap \ | |
pcntl \ | |
exif \ | |
gd \ | |
gmp \ | |
pdo_mysql \ | |
zip \ | |
&& pecl install \ | |
imagick \ | |
redis \ | |
&& docker-php-ext-enable --ini-name 20-imagick.ini imagick \ | |
&& docker-php-ext-enable --ini-name 20-redis.ini redis | |
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
RUN mkdir /home/www | |
RUN chown -R www-data /home/www | |
WORKDIR /home/www | |
COPY ./composer.json /home/www | |
COPY ./composer.lock /home/www | |
COPY . /home/www | |
RUN composer install | |
RUN chmod -R 777 /home/www/storage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment