|
| 1 | +FROM php:8.1-cli-bullseye |
| 2 | + |
| 3 | +# Install dependencies |
| 4 | +RUN apt-get update && apt-get install -yqq \ |
| 5 | + libzip-dev \ |
| 6 | + zip \ |
| 7 | + unzip \ |
| 8 | + wget \ |
| 9 | + gnupg \ |
| 10 | + git \ |
| 11 | + libsodium-dev \ |
| 12 | + libsodium23 \ |
| 13 | + libcurl4-openssl-dev \ |
| 14 | + libxslt1-dev \ |
| 15 | + libxslt1.1 \ |
| 16 | + libicu67 \ |
| 17 | + libicu-dev \ |
| 18 | + libpq-dev \ |
| 19 | + chromium \ |
| 20 | + chromium-driver \ |
| 21 | + firefox-esr |
| 22 | + |
| 23 | +RUN apt-get install -yqq \ |
| 24 | + postgresql-client \ |
| 25 | + mariadb-client |
| 26 | + |
| 27 | +RUN docker-php-ext-install pdo_mysql |
| 28 | +RUN docker-php-ext-install pdo_pgsql |
| 29 | +RUN docker-php-ext-install sodium |
| 30 | +RUN docker-php-ext-install xsl |
| 31 | +RUN docker-php-ext-configure intl |
| 32 | +RUN docker-php-ext-install intl |
| 33 | +RUN docker-php-ext-install zip |
| 34 | +RUN docker-php-ext-install pcntl |
| 35 | +RUN docker-php-ext-install pdo_pgsql |
| 36 | +RUN docker-php-ext-install exif |
| 37 | +RUN docker-php-ext-install soap |
| 38 | +RUN docker-php-ext-install bcmath |
| 39 | +RUN docker-php-ext-install curl |
| 40 | + |
| 41 | +RUN pecl install -o -f redis \ |
| 42 | + && rm -rf /tmp/pear |
| 43 | + |
| 44 | +# Install node and yarn |
| 45 | +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash && \ |
| 46 | + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add && \ |
| 47 | + echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list |
| 48 | + |
| 49 | +RUN apt-get update && apt-get install -yqq \ |
| 50 | + nodejs \ |
| 51 | + yarn |
| 52 | + |
| 53 | +# Create a regular user account to work from |
| 54 | +RUN set -xe; \ |
| 55 | + groupadd -g 1000 developer && \ |
| 56 | + useradd -u 1000 -g developer -m developer && \ |
| 57 | + usermod -p "*" developer -s /bin/bash |
| 58 | + |
| 59 | +# Install composer & make composer global |
| 60 | +RUN curl -s https://getcomposer.org/installer | php && \ |
| 61 | + mv composer.phar /usr/local/bin/composer |
| 62 | + |
| 63 | +# Add cache location for composer |
| 64 | +RUN mkdir /.composer && chown developer:developer /.composer |
| 65 | + |
| 66 | +# Cleanup |
| 67 | +RUN apt-get clean && \ |
| 68 | + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
| 69 | + |
| 70 | +# Install Symfony Installer |
| 71 | +RUN wget https://get.symfony.com/cli/installer -O - | bash |
| 72 | + |
| 73 | +# Make Symfony Global |
| 74 | +RUN mv /root/.symfony/bin/symfony /usr/local/bin/symfony |
| 75 | + |
| 76 | +COPY php.ini /usr/local/etc/php/php.ini |
| 77 | + |
| 78 | +# Set which account to use |
| 79 | +USER developer |
| 80 | + |
| 81 | +# Set working dir for container |
| 82 | +WORKDIR /var/htdocs |
0 commit comments