Created
February 17, 2020 21:21
-
-
Save campsjos/f30d1569c53ccedcde316f33230ce1fa to your computer and use it in GitHub Desktop.
eLearnSecurity Symfony Docker Compose w/ PHP7.3
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
# Get the full project files from here -> https://bitbucket.org/elearnsecurity/symfony-docker-compose | |
FROM elsecarocci/base | |
LABEL maintainer="[email protected]" | |
# Arguments | |
ARG host_user | |
ARG host_group | |
RUN cd /tmp && \ | |
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm && \ | |
rpm -Uvh remi-release-7.rpm && \ | |
yum install yum-utils && \ | |
yum-config-manager --enable remi-php73 | |
# Installing PHP7.3 and XDebug | |
RUN yum update -y && \ | |
yum install php73 php73-php-fpm -y && \ | |
yum install php73-php-mysql php73-php-curl php73-php-gd -y && \ | |
yum install php73-php-xml php73-php-intl php73-php-mcrypt php73-php-pecl-mongodb php73-php-zip -y && \ | |
yum install php73-php-mbstring php73-php-soap pcre-devel php73-php-bcmath -y && \ | |
yum install php73-php-pecl-xdebug -y | |
# Remove and copy php conf files | |
RUN rm -f /etc/opt/remi/php73/php.ini && \ | |
rm -f /etc/opt/remi/php73/php-fpm.conf && \ | |
rm -f /etc/opt/remi/php73/php-fpm.d/www.conf | |
COPY ./conf/php.ini /etc/opt/remi/php73/php.ini | |
COPY ./conf/php-fpm.conf /etc/opt/remi/php73/php-fpm.conf | |
COPY ./conf/pools/www.conf /etc/opt/remi/php73/php-fpm.d/www.conf | |
COPY ./conf/05-opcache.ini /etc/opt/remi/php73/php.d/conf.d/05-opcache.ini | |
COPY ./conf/15-xdebug.ini /etc/opt/remi/php73/php.d/conf.d/15-xdebug.ini | |
# Add users and groups | |
RUN groupadd -g $host_group app && \ | |
useradd -u $host_user -g app -s /bin/bash app | |
# Install Composer | |
COPY --from=composer /usr/bin/composer /usr/bin/composer | |
# Install nodejs | |
RUN cd /tmp && \ | |
curl -sL https://rpm.nodesource.com/setup_10.x | bash - && \ | |
yum install nodejs -y | |
# Install yarn | |
RUN cd /tmp && \ | |
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \ | |
rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg && \ | |
yum install yarn -y && \ | |
yarn global add gulp | |
# Link | |
RUN ln -s /opt/remi/php73/root/bin/php /bin/php && \ | |
ln -s /opt/remi/php73/root/sbin/php-fpm /bin/php-fpm | |
CMD ["/bin/php-fpm"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment