Skip to content

Commit

Permalink
fastdfs合并镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix2yu committed Feb 21, 2024
1 parent 498c771 commit c3bd08e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions fastdfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
FROM debian:stable as builder

ENV FASTDFS_PATH=/opt/fdfs \
FASTDFS_BASE_PATH=/data/fdfs \
LIBFASTCOMMON_VERSION="V1.0.42" \
FASTDFS_VERSION="V5.12"

WORKDIR ${FASTDFS_PATH}
RUN apt-get update && \
apt-get install -y git gcc make
Expand All @@ -26,18 +19,27 @@ LABEL org.opencontainers.image.source = "https://github.com/Felix2yu/docker_buil
ENV FASTDFS_PATH=/opt/fdfs \
FASTDFS_BASE_PATH=/data/fdfs \
TZ=Asia/Shanghai \
FASTDFS_MODE=
FASTDFS_MODE= \
LIBFASTCOMMON_VERSION="V1.0.42" \
FASTDFS_VERSION="V5.12"

COPY --from=builder ${FASTDFS_PATH} ${FASTDFS_PATH}
COPY entrypoint.sh /usr/bin/

RUN chmod +x /usr/bin/entrypoint.sh && \
apt-get update && \
apt-get install -y --no-install-recommends make && \
cd ${FASTDFS_PATH}/libfastcommon && ./make.sh install && \
cd ${FASTDFS_PATH}/fastdfs && ./make.sh install && \
mkdir -p ${FASTDFS_BASE_PATH} && \
apt-get clean -y && rm -rf /var/lib/apt/lists/* /var/cache/apt
apt-get install -y git gcc make && \
mkdir -p ${FASTDFS_BASE_PATH} ${FASTDFS_PATH}/libfastcommon ${FASTDFS_PATH}/fastdfs && \
git clone -b $LIBFASTCOMMON_VERSION https://github.com/happyfish100/libfastcommon.git ${FASTDFS_PATH}/libfastcommon && \
cd ${FASTDFS_PATH}/libfastcommon && \
./make.sh && \
./make.sh install && \
git clone -b $FASTDFS_VERSION https://github.com/happyfish100/fastdfs.git ${FASTDFS_PATH}/fastdfs && \
cd ${FASTDFS_PATH}/fastdfs && \
./make.sh && \
./make.sh install && \
apt-get autoremove -y git gcc make && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /var/cache/apt

EXPOSE 22122 23000
VOLUME ["$FASTDFS_BASE_PATH","/etc/fdfs"]
Expand Down

0 comments on commit c3bd08e

Please sign in to comment.