File tree Expand file tree Collapse file tree 3 files changed +69
-9
lines changed Expand file tree Collapse file tree 3 files changed +69
-9
lines changed Original file line number Diff line number Diff line change 1
- # centos 7
2
- FROM centos:7
1
+ # debian
2
+ FROM debian:bullseye-slim
3
3
4
4
# 环境变量
5
5
ENV TZ "Asia/Shanghai"
@@ -10,7 +10,21 @@ COPY fastdfs.sh /home/
10
10
11
11
# run
12
12
# install packages
13
- RUN yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y
13
+ RUN set -x \
14
+ && apt-get update \
15
+ && apt-get install -y --no-install-recommends \
16
+ ca-certificates \
17
+ git \
18
+ build-essential \
19
+ libpcre3 \
20
+ libpcre3-dev \
21
+ zlib1g \
22
+ zlib1g-dev \
23
+ libssl-dev \
24
+ wget \
25
+ vim \
26
+ && rm -rf /var/lib/apt/lists/*
27
+
14
28
# git clone libfastcommon / libserverframe / fastdfs / fastdfs-nginx-module
15
29
RUN set -x \
16
30
&& cd /usr/local/src \
@@ -43,4 +57,4 @@ RUN cp /usr/local/src/fastdfs/init.d/fdfs_trackerd /etc/init.d/fdfs_trackerd \
43
57
VOLUME /home/dfs
44
58
45
59
EXPOSE 22122 23000 80
46
- ENTRYPOINT ["/home/fastdfs.sh" ]
60
+ ENTRYPOINT ["/home/fastdfs.sh" ]
Original file line number Diff line number Diff line change
1
+ # centos 7
2
+ FROM centos:7
3
+
4
+ #环境变量
5
+ ENV TZ "Asia/Shanghai"
6
+
7
+ # conf
8
+ COPY conf/* /opt/
9
+ COPY fastdfs.sh /home/
10
+
11
+ # run
12
+ # install packages
13
+ RUN yum -y install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim
14
+ # git clone libfastcommon / libserverframe / fastdfs / fastdfs-nginx-module
15
+ RUN set -x \
16
+ && cd /usr/local/src \
17
+ && git clone -b V1.0.68 https://github.com/happyfish100/libfastcommon.git --depth 1 \
18
+ && git clone -b V1.1.28 https://github.com/happyfish100/libserverframe.git --depth 1 \
19
+ && git clone -b V6.09 https://github.com/happyfish100/fastdfs.git --depth 1 \
20
+ && git clone -b V1.23 https://github.com/happyfish100/fastdfs-nginx-module.git --depth 1 \
21
+ && wget http://nginx.org/download/nginx-1.22.1.tar.gz
22
+ # build libfastcommon / libserverframe / fastdfs
23
+ RUN set -x \
24
+ && mkdir /home/dfs \
25
+ && cd /usr/local/src \
26
+ && cd /usr/local/src/libfastcommon \
27
+ && ./make.sh && ./make.sh install \
28
+ && cd /usr/local/src/libserverframe \
29
+ && ./make.sh && ./make.sh install \
30
+ && cd /usr/local/src/fastdfs \
31
+ && ./make.sh && ./make.sh install \
32
+ && cd /usr/local/src \
33
+ && tar -zxvf nginx-1.22.1.tar.gz \
34
+ && cd /usr/local/src/nginx-1.22.1 \
35
+ && ./configure --add-module=/usr/local/src/fastdfs-nginx-module/src \
36
+ && make && make install \
37
+ && chmod +x /home/fastdfs.sh
38
+
39
+ RUN cp /usr/local/src/fastdfs/init.d/fdfs_trackerd /etc/init.d/fdfs_trackerd \
40
+ && cp /usr/local/src/fastdfs/init.d/fdfs_storaged /etc/init.d/fdfs_storaged \
41
+ && rm -rf /usr/local/src*
42
+
43
+ VOLUME /home/dfs
44
+
45
+ EXPOSE 22122 23000 80
46
+ ENTRYPOINT ["/home/fastdfs.sh"]
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ cp /opt/storage.conf /etc/fdfs/storage.conf
12
12
cp /opt/client.conf /etc/fdfs/client.conf
13
13
cp /opt/mod_fastdfs.conf /etc/fdfs/mod_fastdfs.conf
14
14
15
- sed -i -e " s|###TRACKER###|$TRACKER_SERVER |g" /etc/fdfs/client.conf
16
- sed -i -e " s|###TRACKER###|$TRACKER_SERVER |g" /etc/fdfs/storage.conf
17
- sed -i -e " s|###TRACKER###|$TRACKER_SERVER |g" /etc/fdfs/mod_fastdfs.conf
18
- sed -i -e " s|###RESERVED_STORAGE_SPACE###|$RESERVED_STORAGE_SPACE |g" /etc/fdfs/tracker.conf
15
+ sed -i -e " s|###TRACKER###|${ TRACKER_SERVER} |g" /etc/fdfs/client.conf
16
+ sed -i -e " s|###TRACKER###|${ TRACKER_SERVER} |g" /etc/fdfs/storage.conf
17
+ sed -i -e " s|###TRACKER###|${ TRACKER_SERVER} |g" /etc/fdfs/mod_fastdfs.conf
18
+ sed -i -e " s|###RESERVED_STORAGE_SPACE###|${ RESERVED_STORAGE_SPACE} |g" /etc/fdfs/tracker.conf
19
19
20
- echo ${FASTDFS_MODE}
20
+ echo " ${FASTDFS_MODE} "
21
21
22
22
if [ " ${FASTDFS_MODE} " = " tracker" ] ;
23
23
then
You can’t perform that action at this time.
0 commit comments