-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
79 lines (63 loc) · 2.38 KB
/
Dockerfile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:16.04
# Install wget and busybox ( for vi )
RUN apt-get update && \
apt-get install -y busybox nmap unzip wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Alias to busybox for vi
RUN echo 'alias vi="busybox vi"' >> /root/.bashrc
# Install LizardFS from the release candidate 1.13-rc1
RUN set -x && \
wget -qO /tmp/lizardfs.tar https://lizardfs.com/wp-content/uploads/2018/07/lizardfs-bundle-Ubuntu-16.04.tar && \
wget -qO /tmp/fuse3.zip https://lizardfs.com/wp-content/uploads/2018/07/FUSE3-Ubuntu-16.04.zip && \
cd /tmp && \
tar -xf lizardfs.tar && \
unzip fuse3.zip && \
apt-get update && \
apt-get install -y \
./ubuntu16/*fuse*.deb \
./lizardfs*/lizardfs-adm*.deb \
./lizardfs*/lizardfs-cgiserv*.deb \
./lizardfs*/lizardfs-chunkserver*.deb \
./lizardfs*/lizardfs-client*.deb \
./lizardfs*/lizardfs-master*.deb \
./lizardfs*/lizardfs-metalogger*.deb \
./lizardfs*/lizardfs-uraft*.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf lizardfs* ubuntu16 lizardfs.tar fuse3.zip
# Ensure the `mfs` user and group has a consistent uid/gid
RUN usermod -u 9421 mfs
RUN groupmod -g 9421 mfs
#### LIZARDFS MASTER CONFIG ####
# Copy empty metadata file to a spot that will not be overwritten by a volume
RUN cp /var/lib/mfs/metadata.mfs.empty /metadata.mfs.empty
# Setup mfsmaster.cfg
## Default to a master
ENV MFSMASTER_PERSONALITY=master
# Setup mfsexports.cfg defaults
## Allow everything but "meta".
ENV MFSEXPORTS_1="* / rw,alldirs,maproot=0"
## Allow "meta".
ENV MFSEXPORTS_2="* . rw"
# Setup mfsgoals.cfg defaults
ENV MFSGOALS_1="1 1 : _"
ENV MFSGOALS_2="2 2 : _ _"
ENV MFSGOALS_3="3 3 : _ _ _"
ENV MFSGOALS_4="4 4 : _ _ _ _"
ENV MFSGOALS_5="5 5 : _ _ _ _ _"
#### LIZARDFS METALOGGER CONFIG ####
RUN echo "# LizardFS Metalogger config" >> /etc/mfs/mfsmetalogger.cfg
#### LIZARDFS CHUNKSERVER CONFIG ####
RUN echo "# LizardFS Chunkserver config" >> /etc/mfs/mfschunkserver.cfg
# Copy in configuration script
COPY configure.sh /configure.sh
RUN chmod 744 /configure.sh
# Copy in command script
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod 744 /docker-entrypoint.sh
# Expose Ports
EXPOSE 9419 9420 9421 9424
# Set the Docker entrypoint and default command
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "master" ]