学习是一个逐步发现自己无知的过程!

Dockerfile PHP

FROM alpine:3.13

MAINTAINER liux<sirliux@foxmail.com>

# Install time zone plug-ins and optimize time and download sources
RUN apk --no-cache add tzdata \
    && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
    && apk update \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone
ENV TZ Asia/Shanghai

# The installation runs dependent plug-in packages
RUN apk add --no-cache \ 
    build-base zlib-dev \
    php \
    php-gd \
    php-xml \
    php-sockets \
    php-session \
    php-mysqlnd \
    php-mysqli \
    php7-mbstring \
    php7-fpm \
    php7-common \
    php7-dev \
    php7-embed \
    php7-pecl-mcrypt \
    php7-pdo \
    php7-opcache \
    php7-pecl-memcached \
    php7-pdo_sqlite \
    php7-json

# Create a php run user
RUN addgroup www && adduser www -H -D -G www -s /sbin/nologin

# Copy files to containers
ADD showdoc.tar.gz /www
COPY www.conf /etc/php7/php-fpm.d/www.conf

# Set file permissions
RUN chown -R www.www /www && \
    chmod  -R 777 /www

EXPOSE 9000

CMD php-fpm7 && tail -f /etc/passwd
赞(0)
未经允许不得转载:劉大帥 » Dockerfile PHP

你的评论可能会一针见血! 抢沙发

登录

找回密码

注册