Last active
May 1, 2018 17:12
-
-
Save GWillmann/c9cb606eb27c1f1b695a05d1f4923a55 to your computer and use it in GitHub Desktop.
Dockerfile for a custom php docker image
This file contains 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.1 | |
RUN apt-get update | |
# Install first dependencies | |
RUN apt-get install zlib1g-dev \ | |
libpng-dev \ | |
libxslt-dev \ | |
git -yq | |
# Here you can install any other extension that you need | |
RUN docker-php-ext-install zip | |
RUN docker-php-ext-configure mysqli | |
RUN docker-php-ext-install pdo_mysql zip xsl gd pcntl | |
# Install nodejs | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | |
&& apt-get install nodejs -yq | |
# Install yarn | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
&& apt-get update \ | |
&& apt-get install yarn -yq | |
# Install puppeteer dependencies and chromium | |
RUN apt-get install chromium \ | |
xvfb \ | |
gconf-service \ | |
libasound2 \ | |
libatk1.0-0 \ | |
libc6 \ | |
libcairo2 \ | |
libcups2\ | |
libdbus-1-3 \ | |
libexpat1 \ | |
libfontconfig1 \ | |
libgcc1 \ | |
libgconf-2-4 \ | |
libgdk-pixbuf2.0-0 \ | |
libglib2.0-0 \ | |
libgtk-3-0 \ | |
libnspr4 \ | |
libpango-1.0-0 \ | |
libpangocairo-1.0-0 \ | |
libstdc++6 \ | |
libx11-6 \ | |
libx11-xcb1 \ | |
libxcb1 \ | |
libxcomposite1 \ | |
libxcursor1 \ | |
libxdamage1 \ | |
libxext6 \ | |
libxfixes3 \ | |
libxi6 \ | |
libxrandr2 \ | |
libxrender1 \ | |
libxss1 \ | |
libxtst6 \ | |
ca-certificates \ | |
fonts-liberation \ | |
libappindicator1 \ | |
libnss3 \ | |
lsb-release \ | |
xdg-utils \ | |
wget -yq | |
RUN curl -fsSL https://getcomposer.org/installer | php \ | |
&& mv composer.phar /usr/local/bin/composer \ | |
&& composer global require phpunit/phpunit ^7.0 --no-progress --no-scripts --no-interaction | |
ENV PATH /root/.composer/vendor/bin:$PATH | |
COPY entrypoint.sh /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/entrypoint.sh | |
ENTRYPOINT ["entrypoint.sh"] | |
CMD ["php", "-a"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment