docker: move Dockerfile to root of repo
authordvn <git@dvn.me>
Thu, 2 Aug 2018 12:33:18 +0000 (14:33 +0200)
committerdvn <git@dvn.me>
Thu, 2 Aug 2018 12:33:18 +0000 (14:33 +0200)
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.

Dockerfile [new file with mode: 0644]
docker/Dockerfile [deleted file]
docker/README.md

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..4fdd91f
--- /dev/null
@@ -0,0 +1,102 @@
+FROM ubuntu:18.04
+
+ENV DEBIAN_FRONTEND noninteractive
+
+# Install tools and dependencies
+RUN apt-get update && \
+    apt-get -y install --no-install-recommends \
+      ca-certificates \
+      libsasl2-modules \
+      git \
+      automake \
+      autopoint \
+      autoconf \
+      texinfo \
+      libtool \
+      libltdl-dev \
+      libgpg-error-dev \
+      libidn11-dev \
+      libunistring-dev \
+      libglpk-dev \
+      libbluetooth-dev \
+      libextractor-dev \
+      libmicrohttpd-dev \
+      libgnutls28-dev \
+      libgcrypt20-dev \
+      libpq-dev \
+      libsqlite3-dev && \
+    apt-get clean all && \
+    apt-get -y autoremove && \
+    rm -rf \
+      /var/lib/apt/lists/* \
+      /tmp/*
+
+# Install GNUrl
+ENV GNURL_GIT_URL https://git.taler.net/gnurl.git
+ENV GNURL_GIT_BRANCH gnurl-7.57.0
+
+RUN git clone $GNURL_GIT_URL \
+      --branch $GNURL_GIT_BRANCH \
+      --depth=1 \
+      --quiet && \
+    cd /gnurl && \
+      autoreconf -i && \
+      ./configure \
+        --enable-ipv6 \
+        --with-gnutls \
+        --without-libssh2 \
+        --without-libmetalink \
+        --without-winidn \
+        --without-librtmp \
+        --without-nghttp2 \
+        --without-nss \
+        --without-cyassl \
+        --without-polarssl \
+        --without-ssl \
+        --without-winssl \
+        --without-darwinssl \
+        --disable-sspi \
+        --disable-ntlm-wb \
+        --disable-ldap \
+        --disable-rtsp \
+        --disable-dict \
+        --disable-telnet \
+        --disable-tftp \
+        --disable-pop3 \
+        --disable-imap \
+        --disable-smtp \
+        --disable-gopher \
+        --disable-file \
+        --disable-ftp \
+        --disable-smb && \
+      make install && \
+    cd - && \
+    rm -fr /gnurl
+
+# Install GNUnet
+ENV GNUNET_PREFIX /usr/local/gnunet
+ENV CFLAGS '-g -Wall -O0'
+
+COPY . /gnunet
+
+RUN cd /gnunet && \
+      ./bootstrap && \
+      ./configure \
+        --with-nssdir=/lib \
+        --prefix="$GNUNET_PREFIX" \
+        --enable-logging=verbose && \
+      make -j3 && \
+      make install && \
+      ldconfig && \
+    cd - && \
+    rm -fr /gnunet
+
+# Configure GNUnet
+COPY docker/gnunet.conf /etc/gnunet.conf
+COPY docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
+RUN chmod 755 /usr/local/bin/docker-entrypoint
+
+ENV LOCAL_PORT_RANGE='40001 40200'
+ENV PATH "$GNUNET_PREFIX/bin:/usr/local/bin:$PATH"
+
+ENTRYPOINT ["docker-entrypoint"]
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644 (file)
index c91ce42..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-FROM ubuntu:18.04
-
-ENV DEBIAN_FRONTEND noninteractive
-
-# Install tools and dependencies
-RUN apt-get update && \
-    apt-get -y install --no-install-recommends \
-      ca-certificates \
-      libsasl2-modules \
-      git \
-      automake \
-      autopoint \
-      autoconf \
-      texinfo \
-      libtool \
-      libltdl-dev \
-      libgpg-error-dev \
-      libidn11-dev \
-      libunistring-dev \
-      libglpk-dev \
-      libbluetooth-dev \
-      libextractor-dev \
-      libmicrohttpd-dev \
-      libgnutls28-dev \
-      libgcrypt20-dev \
-      libpq-dev \
-      libsqlite3-dev && \
-    apt-get clean all && \
-    apt-get -y autoremove && \
-    rm -rf \
-      /var/lib/apt/lists/* \
-      /tmp/*
-
-# Install GNUrl
-ENV GNURL_GIT_URL https://git.taler.net/gnurl.git
-ENV GNURL_GIT_BRANCH gnurl-7.57.0
-
-RUN git clone $GNURL_GIT_URL \
-      --branch $GNURL_GIT_BRANCH \
-      --depth=1 \
-      --quiet && \
-    cd /gnurl && \
-      autoreconf -i && \
-      ./configure \
-        --enable-ipv6 \
-        --with-gnutls \
-        --without-libssh2 \
-        --without-libmetalink \
-        --without-winidn \
-        --without-librtmp \
-        --without-nghttp2 \
-        --without-nss \
-        --without-cyassl \
-        --without-polarssl \
-        --without-ssl \
-        --without-winssl \
-        --without-darwinssl \
-        --disable-sspi \
-        --disable-ntlm-wb \
-        --disable-ldap \
-        --disable-rtsp \
-        --disable-dict \
-        --disable-telnet \
-        --disable-tftp \
-        --disable-pop3 \
-        --disable-imap \
-        --disable-smtp \
-        --disable-gopher \
-        --disable-file \
-        --disable-ftp \
-        --disable-smb && \
-      make install && \
-    cd - && \
-    rm -fr /gnurl
-
-# Install GNUnet
-ENV GNUNET_PREFIX /usr/local/gnunet
-ENV CFLAGS '-g -Wall -O0'
-
-COPY ../ /gnunet
-
-RUN cd /gnunet && \
-      ./bootstrap && \
-      ./configure \
-        --with-nssdir=/lib \
-        --prefix="$GNUNET_PREFIX" \
-        --enable-logging=verbose && \
-      make -j3 && \
-      make install && \
-      ldconfig && \
-    cd - && \
-    rm -fr /gnunet
-
-# Configure GNUnet
-COPY gnunet.conf /etc/gnunet.conf
-COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
-RUN chmod 755 /usr/local/bin/docker-entrypoint
-
-ENV LOCAL_PORT_RANGE='40001 40200'
-ENV PATH "$GNUNET_PREFIX/bin:/usr/local/bin:$PATH"
-
-ENTRYPOINT ["docker-entrypoint"]
index 4e0e6b951b864697922f61858d7d4d746e136cd3..ce05012fcfa9a31e63abc5254a34d783564b2411 100644 (file)
@@ -7,6 +7,14 @@ A Dockerfile (and maybe later docker-compose.yml) for getting a running GNUnet d
 ## Build it
 This will take quite a while and will consume a bit of data.
 
+First you need to go to the root of this repo.
+
+```bash
+cd ..
+```
+
+Now you can build the image.
+
 ```bash
 docker build -t gnunet .
 ```