3 Star 15 Fork 5

ygqygq2/fastdfs-nginx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile-tengine 2.83 KB
一键复制 编辑 原始数据 按行查看 历史
ygqygq2 提交于 2024-03-17 08:21 . feat: upgrade V6.12.1
## 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"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/ygqygq2/fastdfs-nginx.git
git@gitee.com:ygqygq2/fastdfs-nginx.git
ygqygq2
fastdfs-nginx
fastdfs-nginx
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385