diff options
author | dvn <git@dvn.me> | 2018-08-02 14:33:18 +0200 |
---|---|---|
committer | dvn <git@dvn.me> | 2018-08-02 14:33:18 +0200 |
commit | d837b84241ed01cf42e95c95948224cdbf285e18 (patch) | |
tree | 94878bbae183f0298216a4d46f123fe4a2e65802 /Dockerfile | |
parent | dfe12347d2c359f77d2ca732bf7aa7cb0239922e (diff) | |
download | gnunet-d837b84241ed01cf42e95c95948224cdbf285e18.tar.gz gnunet-d837b84241ed01cf42e95c95948224cdbf285e18.zip |
docker: move Dockerfile to root of repo
This is because of a limitation of Docker, which requires that you run
the Dockerfile from the directory in which you will copy in data. Moving
it to the root of the repo allows us to COPY in the code instead of
doing a 'git pull' from the container.
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..4fdd91f60 --- /dev/null +++ b/Dockerfile | |||
@@ -0,0 +1,102 @@ | |||
1 | FROM ubuntu:18.04 | ||
2 | |||
3 | ENV DEBIAN_FRONTEND noninteractive | ||
4 | |||
5 | # Install tools and dependencies | ||
6 | RUN apt-get update && \ | ||
7 | apt-get -y install --no-install-recommends \ | ||
8 | ca-certificates \ | ||
9 | libsasl2-modules \ | ||
10 | git \ | ||
11 | automake \ | ||
12 | autopoint \ | ||
13 | autoconf \ | ||
14 | texinfo \ | ||
15 | libtool \ | ||
16 | libltdl-dev \ | ||
17 | libgpg-error-dev \ | ||
18 | libidn11-dev \ | ||
19 | libunistring-dev \ | ||
20 | libglpk-dev \ | ||
21 | libbluetooth-dev \ | ||
22 | libextractor-dev \ | ||
23 | libmicrohttpd-dev \ | ||
24 | libgnutls28-dev \ | ||
25 | libgcrypt20-dev \ | ||
26 | libpq-dev \ | ||
27 | libsqlite3-dev && \ | ||
28 | apt-get clean all && \ | ||
29 | apt-get -y autoremove && \ | ||
30 | rm -rf \ | ||
31 | /var/lib/apt/lists/* \ | ||
32 | /tmp/* | ||
33 | |||
34 | # Install GNUrl | ||
35 | ENV GNURL_GIT_URL https://git.taler.net/gnurl.git | ||
36 | ENV GNURL_GIT_BRANCH gnurl-7.57.0 | ||
37 | |||
38 | RUN git clone $GNURL_GIT_URL \ | ||
39 | --branch $GNURL_GIT_BRANCH \ | ||
40 | --depth=1 \ | ||
41 | --quiet && \ | ||
42 | cd /gnurl && \ | ||
43 | autoreconf -i && \ | ||
44 | ./configure \ | ||
45 | --enable-ipv6 \ | ||
46 | --with-gnutls \ | ||
47 | --without-libssh2 \ | ||
48 | --without-libmetalink \ | ||
49 | --without-winidn \ | ||
50 | --without-librtmp \ | ||
51 | --without-nghttp2 \ | ||
52 | --without-nss \ | ||
53 | --without-cyassl \ | ||
54 | --without-polarssl \ | ||
55 | --without-ssl \ | ||
56 | --without-winssl \ | ||
57 | --without-darwinssl \ | ||
58 | --disable-sspi \ | ||
59 | --disable-ntlm-wb \ | ||
60 | --disable-ldap \ | ||
61 | --disable-rtsp \ | ||
62 | --disable-dict \ | ||
63 | --disable-telnet \ | ||
64 | --disable-tftp \ | ||
65 | --disable-pop3 \ | ||
66 | --disable-imap \ | ||
67 | --disable-smtp \ | ||
68 | --disable-gopher \ | ||
69 | --disable-file \ | ||
70 | --disable-ftp \ | ||
71 | --disable-smb && \ | ||
72 | make install && \ | ||
73 | cd - && \ | ||
74 | rm -fr /gnurl | ||
75 | |||
76 | # Install GNUnet | ||
77 | ENV GNUNET_PREFIX /usr/local/gnunet | ||
78 | ENV CFLAGS '-g -Wall -O0' | ||
79 | |||
80 | COPY . /gnunet | ||
81 | |||
82 | RUN cd /gnunet && \ | ||
83 | ./bootstrap && \ | ||
84 | ./configure \ | ||
85 | --with-nssdir=/lib \ | ||
86 | --prefix="$GNUNET_PREFIX" \ | ||
87 | --enable-logging=verbose && \ | ||
88 | make -j3 && \ | ||
89 | make install && \ | ||
90 | ldconfig && \ | ||
91 | cd - && \ | ||
92 | rm -fr /gnunet | ||
93 | |||
94 | # Configure GNUnet | ||
95 | COPY docker/gnunet.conf /etc/gnunet.conf | ||
96 | COPY docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
97 | RUN chmod 755 /usr/local/bin/docker-entrypoint | ||
98 | |||
99 | ENV LOCAL_PORT_RANGE='40001 40200' | ||
100 | ENV PATH "$GNUNET_PREFIX/bin:/usr/local/bin:$PATH" | ||
101 | |||
102 | ENTRYPOINT ["docker-entrypoint"] | ||