代码拉取完成,页面将自动刷新
## Dockerfile
FROM ubuntu:24.04
LABEL maintainer "29ygq@sina.com"
ENV FASTDFS_PATH=/opt/fdfs \
FASTDFS_BASE_PATH=/var/fdfs \
LIBFASTCOMMON_VERSION="V1.0.73" \
LIBSERVERFRAME_VERSION="V1.2.3" \
FASTDFS_NGINX_MODULE_VERSION="V1.24" \
FASTDFS_VERSION="V6.12.1" \
FREENGINX_VERSION="1.25.4" \
TENGINE_VERSION="3.1.0" \
PORT= \
GROUP_NAME= \
TRACKER_SERVER= \
CUSTOM_CONFIG="false"
# get all the dependences
RUN apt-get update && apt-get install -y curl git gcc make wget libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# create the dirs to store the files downloaded from internet
RUN mkdir -p ${FASTDFS_PATH}/libfastcommon \
&& mkdir -p ${FASTDFS_PATH}/fastdfs \
&& mkdir -p ${FASTDFS_PATH}/fastdfs-nginx-module \
&& mkdir ${FASTDFS_BASE_PATH} \
&& mkdir /nginx_conf && mkdir -p /usr/local/nginx/conf/conf.d
WORKDIR ${FASTDFS_PATH}
## compile the libfastcommon
RUN git clone -b $LIBFASTCOMMON_VERSION https://github.com/happyfish100/libfastcommon.git libfastcommon \
&& cd libfastcommon \
&& ./make.sh \
&& ./make.sh install \
&& rm -rf ${FASTDFS_PATH}/libfastcommon
## compile the libserverframe
RUN git clone -b $LIBSERVERFRAME_VERSION https://github.com/happyfish100/libserverframe.git libserverframe \
&& cd libserverframe \
&& ./make.sh \
&& ./make.sh install \
&& rm -rf ${FASTDFS_PATH}/libserverframe
## compile the fastdfs
RUN git clone -b $FASTDFS_VERSION https://github.com/happyfish100/fastdfs.git fastdfs \
&& cd fastdfs \
&& ./make.sh \
&& ./make.sh install \
&& rm -rf ${FASTDFS_PATH}/fastdfs
RUN useradd -m -s /bin/bash www
## comile nginx
# nginx url: https://freenginx.org/download/freenginx-${NGINX_VERSION}.tar.gz
# tengine url: http://tengine.taobao.org/download/tengine-${TENGINE_VERSION}.tar.gz
RUN git clone -b $FASTDFS_NGINX_MODULE_VERSION https://github.com/happyfish100/fastdfs-nginx-module.git fastdfs-nginx-module \
&& wget http://tengine.taobao.org/download/tengine-${TENGINE_VERSION}.tar.gz \
&& tar -zxf tengine-${TENGINE_VERSION}.tar.gz \
&& cd tengine-${TENGINE_VERSION} \
&& ./configure --prefix=/usr/local/nginx \
--user=www \
--add-module=${FASTDFS_PATH}/fastdfs-nginx-module/src/ \
--add-module=./modules/ngx_http_upstream_dynamic_module \
--add-module=./modules/ngx_http_upstream_check_module \
&& make \
&& make install \
&& ln -s /usr/local/nginx/sbin/nginx /usr/bin/ \
&& rm -rf ${FASTDFS_PATH}/tengine-* \
&& rm -rf ${FASTDFS_PATH}/fastdfs-nginx-module
EXPOSE 22122 23000 8080 8888 80
VOLUME ["$FASTDFS_BASE_PATH","/etc/fdfs","/usr/local/nginx/conf/conf.d"]
COPY conf/*.* /etc/fdfs/
COPY nginx_conf/ /nginx_conf/
COPY nginx_conf/nginx.conf /usr/local/nginx/conf/
COPY entrypoint.sh /usr/bin/
RUN chmod a+x /usr/bin/entrypoint.sh
WORKDIR ${FASTDFS_PATH}
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
CMD ["tracker"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。