-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
55 lines (46 loc) · 1.36 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
FROM cusspvz/node:4.1.2
MAINTAINER José Moreira <[email protected]>
ADD apks /tmp/apks
RUN apk --update add s6 nfs-utils && \
apk add --allow-untrusted \
/tmp/apks/glibc-2.21-r2.apk \
/tmp/apks/glibc-bin-2.21-r2.apk \
&& \
/usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
rm -fR /tmp/apks && \
rm -fR /var/cache/apk/* && \
echo "ALL:ALL" > /etc/hosts.allow && \
echo "" > /etc/hosts.deny
ENV DEBUG="" \
DATA_PATH=/data \
HOST_DATA_PATH=/mnt/resources \
BTSYNC_PID_PATH=/var/run/btsync.pid \
BTSYNC_CONFIG_PATH=/data/btsync.conf \
BTSYNC_CONFIG_INTERVAL_CHECK=10 \
BTSYNC_USER=btysnc \
BTSYNC_UID=1000 \
BTSYNC_GROUP=btysnc \
BTSYNC_GID=1000 \
BTSYNC_HOME=/home/btsync \
NFS=1 \
NFS_NUM_SERVERS=8 \
NFS_PORT=2049 \
NODE_ENV=production
ADD bin /app/bin/
ADD s6 /app/s6/
ADD package.json /app/package.json
RUN npm install --production
RUN mkdir /data && \
for bin in $(ls /app/bin/*); do \
chmod +x $bin && \
ln -s $bin /sbin/$(basename $bin); \
done; \
chmod +x /app/s6/*/*;
# NFS
EXPOSE 111/tcp $NFS_PORT/tcp $NFS_PORT/udp
# BTSync - comm + webui ports
EXPOSE 55555/tcp 8888/tcp
VOLUME $DATA_PATH
ENTRYPOINT [ "/sbin/entrypoint" ]
CMD [ "" ]