-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (33 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
49 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM centos:7
LABEL maintainer "luhuiguo@gmail.com"
ENV FASTDFS_PATH=/opt/fdfs \
FASTDFS_BASE_PATH=/var/fdfs \
PORT= \
GROUP_NAME= \
TRACKER_SERVER=
#get all the dependences
RUN yum install -y git gcc make
#create the dirs to store the files downloaded from internet
RUN mkdir -p ${FASTDFS_PATH}/libfastcommon \
&& mkdir -p ${FASTDFS_PATH}/fastdfs \
&& mkdir ${FASTDFS_BASE_PATH}
#compile the libfastcommon
WORKDIR ${FASTDFS_PATH}/libfastcommon
RUN git clone --branch V1.0.36 --depth 1 https://github.com/happyfish100/libfastcommon.git ${FASTDFS_PATH}/libfastcommon \
&& ./make.sh \
&& ./make.sh install \
&& rm -rf ${FASTDFS_PATH}/libfastcommon
#compile the fastdfs
WORKDIR ${FASTDFS_PATH}/fastdfs
RUN git clone --branch V5.11 --depth 1 https://github.com/happyfish100/fastdfs.git ${FASTDFS_PATH}/fastdfs \
&& ./make.sh \
&& ./make.sh install \
&& rm -rf ${FASTDFS_PATH}/fastdfs
EXPOSE 22122 23000 8080 8888
VOLUME ["$FASTDFS_BASE_PATH", "/etc/fdfs"]
COPY conf/*.* /etc/fdfs/
COPY start.sh /usr/bin/
#make the start.sh executable
RUN chmod 777 /usr/bin/start.sh
ENTRYPOINT ["/usr/bin/start.sh"]
CMD ["tracker"]