system-alinux4 是 fb7f8ed 引入的,仓库里从未提交过 image/system-alinux4,
该 FROM 依赖一个仓库内无法构建的镜像;改回 system-alinux3,与其余自建镜像一致。
56 lines
1.8 KiB
Docker
56 lines
1.8 KiB
Docker
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:system-alinux3
|
||
LABEL MAINTAINER="tianjun@odboy.cn"
|
||
ENV TimeZone=Asia/Shanghai
|
||
ENV TENGINE_VERSION=3.1.0
|
||
ENV NGINX_HOME=/usr/local/nginx
|
||
ENV PATH="${NGINX_HOME}/sbin:$PATH"
|
||
WORKDIR /home/admin
|
||
# 使用自定义配置覆盖默认可映射的目录:conf/nginx.conf、conf/conf.d、conf/ssl
|
||
COPY nginx.conf ${NGINX_HOME}/conf/nginx.conf
|
||
# https://tengine.taobao.org/download/tengine-3.1.0.tar.gz
|
||
# 由 build.sh 预先下载到本目录
|
||
ADD tengine-${TENGINE_VERSION}.tar.gz ./
|
||
# gcc/gcc-c++/make 用于编译 tengine;sysstat/net-tools 用于排障
|
||
RUN set -e && yum install \
|
||
gcc \
|
||
gcc-c++ \
|
||
make \
|
||
tar \
|
||
pcre-devel \
|
||
zlib-devel \
|
||
openssl-devel \
|
||
libxml2-devel \
|
||
libxslt-devel \
|
||
gd-devel \
|
||
sysstat \
|
||
net-tools -y; \
|
||
cd tengine-${TENGINE_VERSION}; \
|
||
./configure \
|
||
--prefix=${NGINX_HOME} \
|
||
--with-http_stub_status_module \
|
||
--with-http_ssl_module \
|
||
--with-http_v2_module \
|
||
--with-http_realip_module \
|
||
--with-http_gzip_static_module \
|
||
--with-http_sub_module \
|
||
--with-http_dav_module \
|
||
--with-http_secure_link_module \
|
||
--with-http_slice_module \
|
||
--with-http_xslt_module \
|
||
--with-http_image_filter_module \
|
||
--with-stream \
|
||
--with-stream_ssl_module \
|
||
--with-stream_realip_module \
|
||
--with-pcre-jit; \
|
||
make; \
|
||
make install; \
|
||
mkdir -p ${NGINX_HOME}/conf/ssl ${NGINX_HOME}/conf/conf.d; \
|
||
ls -l ${NGINX_HOME}/sbin; \
|
||
${NGINX_HOME}/sbin/nginx -t -c ${NGINX_HOME}/conf/nginx.conf; \
|
||
rm -rf /home/admin/tengine-${TENGINE_VERSION}
|
||
|
||
# tengine 默认以 nobody 用户运行 worker 进程,root 启动后自动降权,可直接监听 80/443
|
||
EXPOSE 80 443
|
||
STOPSIGNAL SIGQUIT
|
||
CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
|