代码拉取完成,页面将自动刷新
FROM php:7.4-cli
# Set working dir.
ARG CONTAINER_APP_DIR
WORKDIR ${CONTAINER_APP_DIR}
RUN uname -a && \
apt update
# Change ubuntu source.
# Reference: https://github.com/laradock/laradock
ARG UBUNTU_SOURCE
ARG CHANGE_UBUNTU_SOURCE
COPY ./sources.sh /tmp/sources.sh
RUN if [ ${CHANGE_UBUNTU_SOURCE} = true ]; then \
apt-get install -y gnupg2 && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32 && \
chmod +x /tmp/sources.sh && \
/bin/bash -c /tmp/sources.sh && \
rm -rf /tmp/sources.sh && \
apt update \
;fi
# Install php ext.
RUN apt-get remove -y libssl1.1 && \
apt-get install libssl1.1 krb5-locales libkrb5support0=1.16-2ubuntu0.2 libkrb5-3 libgssapi-krb5-2 libcurl4 --allow-downgrades -y && \
docker-php-ext-install sockets pcntl && \
docker-php-ext-install pdo_mysql && \
pecl install redis && \
docker-php-ext-enable redis && \
apt-get install libssl-dev -y
ARG INSTALL_LIB_EVENT
RUN if [ ${INSTALL_LIB_EVENT} = true ]; then \
apt-get install libevent-dev -y && \
pecl install event && \
echo extension=event.so > /usr/local/etc/php/conf.d/event.ini \
;fi
# Install composer and set mirror.
# Reference: https://pkg.phpcomposer.com/#how-to-install-composer
# Referencr: https://developer.aliyun.com/composer
ARG INSTALL_COMPOSER
ARG COMPOSER_INSTALLER
ARG COMPOSER_MIRROR
RUN if [ ${INSTALL_COMPOSER} = true ]; then \
php -r "copy('${COMPOSER_INSTALLER}', 'composer-setup.php');" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
mv composer.phar /usr/local/bin/composer && \
composer config -g repo.packagist composer ${COMPOSER_MIRROR} \
;fi
RUN apt-get install git zip vim -y
# Expose port
ARG CONTAINER_PORT
EXPOSE ${CONTAINER_PORT}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。