1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- FROM php:8.3-fpm
- # RUN sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list
- # COPY sources.list.strech /etc/apt/sources.list
- RUN apt-get update \
- && apt-get upgrade -y \
- && apt-get install -y nano \
- && apt-get install -y libfreetype6-dev \
- && apt-get install -y zlib1g-dev \
- && apt-get install -y libzip-dev \
- && apt-get install -y libjpeg62-turbo-dev \
- && apt-get install -y libpng-dev \
- && apt-get install -y zip \
- && apt-get install -y git \
- && apt-get install -y supervisor \
- && apt-get install -y mariadb-client \
- && docker-php-ext-install bcmath \
- && docker-php-ext-install ctype \
- && docker-php-ext-configure gd --with-external-gd \
- && docker-php-ext-install gd mysqli zip pdo pdo_mysql mbstring exif pcntl bcmath opcache \
- && docker-php-ext-enable mysqli pdo pdo_mysql exif pcntl bcmath gd
- RUN apt-get install --assume-yes --no-install-recommends --quiet \
- build-essential \
- libmagickwand-dev
- # && apt-get clean all
- # RUN pecl install imagick \
- # && docker-php-ext-enable imagick
- RUN pecl install mongodb
- RUN echo "extension=mongodb.so" > $PHP_INI_DIR/conf.d/mongodb.ini
- RUN pecl install redis
- RUN echo "extension=redis.so" > $PHP_INI_DIR/conf.d/redis.ini
- # xdebug 3.1.6
- RUN pecl install xdebug-3.3.2 \
- && docker-php-ext-enable xdebug
- # install composer
- RUN php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
- RUN php composer-setup.php
- RUN mv composer.phar /usr/local/bin/composer
- RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
- # COPY config/10-shorttag.ini \
- # config/20-memory-limit.ini \
- # config/30-opcache.ini \
- # config/40-xdebug.ini \
- # $PHP_INI_DIR/conf.d/
- WORKDIR /var/www/html
- #COPY composer.lock composer.json /var/www/
- RUN apt-get clean && rm -rf /var/lib/apt/lists/*
- EXPOSE 9000
- RUN groupadd -g 1000 www
- RUN useradd -u 1000 -ms /bin/bash -g www www
- #COPY --chown=www:www . /var/www
- USER www
- CMD service supervisor start \
- && php-fpm
|