Last active
September 26, 2020 21:48
-
-
Save rkamradt/e22424c408f970c24e6d5f19324a23e7 to your computer and use it in GitHub Desktop.
Fat image of PHP/Composer/Symfony
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.3 | |
WORKDIR /var/www | |
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | |
php composer-setup.php && \ | |
php -r "unlink('composer-setup.php');" && \ | |
mv composer.phar /bin/composer | |
RUN apt-get update \ | |
&& apt-get install -y wget unzip git \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN docker-php-ext-install pdo pdo_mysql mysqli | |
RUN wget https://get.symfony.com/cli/installer -O - | bash \ | |
&& mv /root/.symfony/bin/symfony /bin/symfony | |
COPY . /var/www | |
RUN composer dump-env prod | |
CMD [ "symfony", "server:start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment