1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- FROM php:8.0-fpm
- MAINTAINER xs
- ENV TZ="Asia/Shanghai"
- RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- #RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
- # echo "deb http://mirrors.aliyu n.com/debian/ buster main non-free contrib" >/etc/apt/sources.list && \
- # echo "deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib" >>/etc/apt/sources.list && \
- # echo "deb http://mirrors.aliyun.com/debian-security buster/updates main" >>/etc/apt/sources.list && \
- # echo "deb-src http://mirrors.aliyun.com/debian-security buster/updates main" >>/etc/apt/sources.list && \
- # echo "deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib" >>/etc/apt/sources.list && \
- # echo "deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib" >>/etc/apt/sources.list && \
- # echo "deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" >>/etc/apt/sources.list && \
- # echo "deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" >>/etc/apt/sources.list
- # Utils
- RUN apt-get update && \
- apt-get install -y libssl-dev libaio-dev procps wget vim zip unzip git net-tools dnsutils && \
- apt-get clean
- # Composer
- RUN curl -sS https://getcomposer.org/installer | php && \
- mv composer.phar /usr/local/bin/composer && \
- composer self-update --clean-backups && \
- composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
- # Core Libs
- RUN echo "Installing Core Libs..." && \
- #gd
- apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
- docker-php-ext-configure gd --with-freetype --with-jpeg && \
- docker-php-ext-install -j$(nproc) gd && \
- # bcmath
- docker-php-ext-install bcmath && \
- # sockets
- docker-php-ext-install sockets && \
- # MySQL extension
- docker-php-ext-install mysqli && \
- docker-php-ext-install pdo_mysql && \
- # Redis
- pecl install redis && \
- docker-php-ext-enable redis && \
- # swoole
- pecl install swoole && \
- docker-php-ext-enable swoole
- # ZIP
- RUN apt-get install -y libzip-dev && \
- docker-php-ext-install -j$(nproc) zip
- ## Crontab
- RUN apt-get install -y cron
- # Expose port 9000
- EXPOSE 9000
- WORKDIR /
|