-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-alpine
executable file
·55 lines (47 loc) · 1.95 KB
/
Dockerfile-alpine
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
# Dtella@Home NMDC Server
#
# Dtella is an open-source, decentralized server for the NMDC protocol originally
# created by Purdue for internal file sharing. This docker image is based on the
# the Dtella@Home port of the original software:
# https://code.google.com/archive/p/dtella-home/
# Only modifications to make the Dtella@Home software ports predicatable, provide
# a unique network/encryption key, and add a better persisten storage path have been
# made.
#
# Host networking is required to properly bind to the loopback interface.
#
# Your NMDC client must connect to 127.0.0.1 and must report the local IP address
# as 127.0.0.1
#
# Dtella does not perform active IP detection for it's internal translations. Client
# IP addresses will be inferred via the Dtella connections. As a result, it is not
# safe to use multiple clients behind the same NAT, without using NAT loopback, when
# connecting to other public IP addresses.
#
# Set NETWORK_KEY to define a custom encryption key for your network and to control
# access.
#
# Mount a directory to /data for persistent storage of logs and clients.
# Start with python slim base image
FROM python:2.7.14-alpine3.6
MAINTAINER Adam Schultz <[email protected]>
# Install required tools
#RUN apt-get -q update && apt-get install -qy gcc && \
# pip install -v twisted PyCrypto dnspython gdata && \
# apt-get -y purge gcc && \
# apt-get -y clean && apt-get -y autoclean && apt-get -y autoremove
RUN apk update && apk add gcc linux-headers musl-dev && \
pip install -v twisted PyCrypto dnspython gdata && \
apk del gcc linux-headers musl-dev
# Copy in Dtella
RUN mkdir /dtella
COPY dtella-home-1.1.5 /dtella/
RUN chmod -R 755 /dtella/
# For storing persistent information (logs, clients, etc)
RUN mkdir /data
RUN chmod 777 /data
VOLUME ["/data"]
# Modified Dtella uses TCP 27999 as the NMDC server port and UDP 27998 as Dtella-to-Dtella port
EXPOSE 27998/UDP 27999/TCP
# Run the server
CMD ["/dtella/dtella.py"]