|
| 1 | +FROM php:8.0-rc-cli |
| 2 | + |
| 3 | +LABEL maintainer="ReadyMadeHost http://readymadehost.com" |
| 4 | + |
| 5 | +# Installing required packages |
| 6 | +RUN apt-get update && apt-get upgrade -y |
| 7 | +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ |
| 8 | + apt-transport-https \ |
| 9 | + libicu-dev \ |
| 10 | + libonig-dev \ |
| 11 | + libzip-dev \ |
| 12 | + libpng-dev \ |
| 13 | + libcurl4-openssl-dev \ |
| 14 | + pkg-config \ |
| 15 | + libssl-dev \ |
| 16 | + git \ |
| 17 | + vim \ |
| 18 | + zip \ |
| 19 | + unzip \ |
| 20 | + wget \ |
| 21 | + screenfetch \ |
| 22 | + mariadb-client |
| 23 | + |
| 24 | +# Installing extensions |
| 25 | +RUN docker-php-ext-install \ |
| 26 | + pdo_mysql \ |
| 27 | + intl \ |
| 28 | + mbstring \ |
| 29 | + zip \ |
| 30 | + exif \ |
| 31 | + pcntl \ |
| 32 | + bcmath \ |
| 33 | + opcache \ |
| 34 | + gd |
| 35 | + |
| 36 | +# pcel is not avilable so using pickle |
| 37 | +RUN wget https://github.com/FriendsOfPHP/pickle/releases/download/v0.6.0/pickle.phar && mv pickle.phar /usr/local/bin/pickle |
| 38 | +RUN chmod +x /usr/local/bin/pickle |
| 39 | + |
| 40 | +# Installing others dependencies |
| 41 | +RUN pickle install apcu --defaults |
| 42 | +RUN docker-php-ext-enable apcu |
| 43 | + |
| 44 | +# Installing other extensions but enabled dynamically |
| 45 | +# RUN pickle install redis --dev --defaults // not working |
| 46 | +# RUN docker-php-ext-enable redis |
| 47 | +# RUN pickle install xdebug --dev --defaults // not working |
| 48 | +# RUN docker-php-ext-enable xdebug |
| 49 | +# RUN pickle install mongodb --defaults // not working |
| 50 | +# RUN docker-php-ext-enable mongodb |
| 51 | + |
| 52 | +# Updating php.ini |
| 53 | +ADD conf/php.ini /usr/local/etc/php/php.ini |
| 54 | + |
| 55 | +# Installing composer |
| 56 | +VOLUME /root/.composer/cache |
| 57 | +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer |
| 58 | + |
| 59 | +# Installing symfony cli |
| 60 | +RUN wget https://get.symfony.com/cli/installer -O - | bash |
| 61 | +RUN echo 'export PATH="$HOME/.symfony/bin:$PATH"' >> ~/.bashrc |
| 62 | + |
| 63 | +ARG NODE_VERSION |
| 64 | +ENV NODE_VERSION ${NODE_VERSION} |
| 65 | + |
| 66 | +# Installing node |
| 67 | +RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - |
| 68 | +RUN apt-get -y install nodejs |
| 69 | + |
| 70 | +# Manage project and add scripts |
| 71 | +RUN mkdir /var/www/project |
| 72 | +ADD manage-project-permission.sh /root/manage-project-permission.sh |
| 73 | +RUN chmod +x /root/manage-project-permission.sh |
| 74 | +RUN echo 'alias mpp="/root/manage-project-permission.sh"' >> /root/.bashrc |
| 75 | +RUN /root/manage-project-permission.sh |
| 76 | + |
| 77 | +ARG PHP_ENABLE_REDIS |
| 78 | +ENV PHP_ENABLE_REDIS ${PHP_ENABLE_REDIS} |
| 79 | +ARG PHP_ENABLE_XDEBUG |
| 80 | +ENV PHP_ENABLE_XDEBUG ${PHP_ENABLE_XDEBUG} |
| 81 | +ARG PHP_ENABLE_MONGODB |
| 82 | +ENV PHP_ENABLE_MONGODB ${PHP_ENABLE_MONGODB} |
| 83 | + |
| 84 | +ADD docker-entrypoint.sh /root/docker-entrypoint.sh |
| 85 | +RUN chmod +x /root/docker-entrypoint.sh |
| 86 | + |
| 87 | +CMD ["/root/docker-entrypoint.sh", "bash"] |
0 commit comments