summaryrefslogtreecommitdiff
path: root/sandcastle/images/base/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'sandcastle/images/base/Dockerfile')
-rw-r--r--sandcastle/images/base/Dockerfile107
1 files changed, 107 insertions, 0 deletions
diff --git a/sandcastle/images/base/Dockerfile b/sandcastle/images/base/Dockerfile
new file mode 100644
index 0000000..7226f6f
--- /dev/null
+++ b/sandcastle/images/base/Dockerfile
@@ -0,0 +1,107 @@
+FROM debian:stable
+RUN apt-get update
+
+RUN apt-get install -y autoconf autopoint libtool texinfo \
+ libgcrypt-dev libidn11-dev zlib1g-dev libunistring-dev \
+ libjansson-dev python3-pip git recutils libsqlite3-dev \
+ libpq-dev postgresql libcurl4-openssl-dev libsodium-dev git \
+ libqrencode-dev zip jq npm openjdk-17-jre nginx procps \
+ curl python3-jinja2 wget curl python3-sphinx socat apache2-utils \
+ python3-sphinx-rtd-theme sqlite3 vim emacs
+RUN pip3 install requests click poetry uwsgi htmlark
+
+ARG tags_file
+# The following command provides a conditional copy from
+# the host filesystem. It mounts the current directory -
+# where the tags file MIGHT be - to /context in the container.
+# It appears NOT possible to mount arbitrary paths from the
+# host with "RUN --mount". Hence, when a tags file is given,
+# the CWD has to be the one containing the tags file. build_base.sh
+# sets (1) the CWD this way and (2) $tags_file to be the tags file
+# basename, before starting the compilation.
+RUN --mount=target=/context if test -n "$tags_file"; then cp \
+/context/${tags_file} /tags.sh; else touch /tags.sh; fi
+
+RUN . /tags.sh && git clone git://git.gnunet.org/libmicrohttpd \
+ --branch ${TAG_LIBMHD:-master}
+RUN . /tags.sh && git clone git://git.gnunet.org/gnunet \
+ --branch ${TAG_GNUNET:-master}
+RUN . /tags.sh && git clone git://git.taler.net/exchange \
+ --branch ${TAG_EXCHANGE:-master}
+RUN . /tags.sh && git clone git://git.taler.net/merchant \
+ --branch ${TAG_MERCHANT:-master}
+RUN . /tags.sh && git clone git://git.taler.net/libeufin \
+ --branch ${TAG_LIBEUFIN:-master}
+RUN . /tags.sh && git clone git://git.taler.net/taler-merchant-demos \
+ --branch ${TAG_MERCHANT_DEMOS:-master}
+RUN . /tags.sh && git clone git://git.taler.net/wallet-core \
+ --branch ${TAG_WALLET:-master}
+RUN . /tags.sh && git clone git://git.taler.net/sync \
+ --branch ${TAG_SYNC:-master}
+
+WORKDIR /libmicrohttpd
+RUN ./bootstrap
+RUN ./configure --disable-doc
+RUN make install
+
+WORKDIR /gnunet
+RUN ./bootstrap
+RUN ./configure --enable-logging=verbose --disable-documentation
+RUN make install
+
+WORKDIR /exchange
+RUN if . /tags.sh && test "${TAG_EXCHANGE:-}" = "v0.9.0"; then \
+ # Init Gana and checkout the v0.9.0-compatible commit.
+ git submodule init contrib/gana; \
+ git submodule update --remote contrib/gana; \
+ # Note: without init first, the following checkout hits "reference is not a tree".
+ git -C contrib/gana checkout 6b9824cb4d4561f1167c7f518998a226a82222d6; \
+ # Remove master branch tracking the remote
+ git -C contrib/gana branch -d master; \
+ git -C contrib/gana remote set-url origin .; \
+ git -C contrib/gana branch master; \
+fi
+RUN ./bootstrap
+RUN ./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc
+RUN make install
+
+WORKDIR /merchant
+RUN ./bootstrap
+RUN ./configure CFLAGS="-ggdb -O0" \
+ --enable-logging=verbose \
+ --disable-doc
+RUN make install
+
+WORKDIR /libeufin
+RUN ./bootstrap
+RUN ./configure
+RUN make install
+
+WORKDIR /taler-merchant-demos
+RUN ./bootstrap
+RUN ./configure
+RUN make install
+
+# From: https://github.com/nodesource/distributions/blob/master/README.md#debinstall
+RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && \
+apt-get install -y nodejs
+RUN npm install -g pnpm
+
+WORKDIR /wallet-core
+RUN ./bootstrap
+WORKDIR ./packages/demobank-ui
+RUN ./configure
+RUN make install
+# Install CLI to provide integration tests.
+WORKDIR ../taler-wallet-cli
+RUN ./configure
+RUN make install
+
+WORKDIR /sync
+RUN ./bootstrap
+RUN ./configure CFLAGS="-ggdb -O0" \
+ --enable-logging=verbose \
+ --disable-doc
+RUN make install
+
+WORKDIR /