From 7a66af50f5e94a34e6d2adad0e4b3956d690b431 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Thu, 12 May 2016 00:07:41 +0200 Subject: adding Dockerfile which builds all Taler components based on the Makefile logic --- docker/gnunet/Dockerfile | 57 --------------------------------- docker/taler-full/Dockerfile | 75 ++++++++++++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 84 deletions(-) delete mode 100644 docker/gnunet/Dockerfile diff --git a/docker/gnunet/Dockerfile b/docker/gnunet/Dockerfile deleted file mode 100644 index 9161ee7..0000000 --- a/docker/gnunet/Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -FROM debian:jessie - -ENV PREFIX=/usr - -RUN apt-get update && apt-get install -y \ - git subversion \ - make \ - autoconf autopoint libtool texinfo \ - libgcrypt-dev libidn11-dev zlib1g-dev libunistring-dev \ - libjansson-dev \ - libsqlite3-dev \ - libpq-dev postgresql \ - \ - && \ - rm -rf /var/lib/apt/lists/* - - -# -# Build gnurl -# -RUN \ - mkdir /build && cd /build && \ - git clone git://taler.net/gnurl.git && \ - cd gnurl && \ - ./buildconf && \ - ./configure --prefix=$PREFIX --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 && \ - make install && \ - rm -rf /build - - -# -# Build mhd -# -RUN \ - mkdir /build && cd /build && \ - svn checkout https://gnunet.org/svn/libmicrohttpd && \ - cd libmicrohttpd && \ - ./bootstrap && \ - ./configure --prefix=$PREFIX && \ - make && \ - make install && \ - rm -rf /build - - -# -# Build gnunet -# -RUN \ - mkdir /build && cd /build && \ - svn checkout https://gnunet.org/svn/gnunet && \ - cd gnunet && \ - ./bootstrap && \ - ./configure --prefix=$PREFIX && \ - make && \ - make install && \ - rm -rf /build diff --git a/docker/taler-full/Dockerfile b/docker/taler-full/Dockerfile index cfb529d..af73d5c 100644 --- a/docker/taler-full/Dockerfile +++ b/docker/taler-full/Dockerfile @@ -1,38 +1,59 @@ -FROM fldold/gnunet +FROM debian:jessie ENV PREFIX=/usr RUN apt-get update && apt-get install -y \ + git subversion \ + make \ + autoconf autopoint libtool texinfo \ + libgcrypt-dev libidn11-dev zlib1g-dev libunistring-dev \ + libjansson-dev \ + libsqlite3-dev \ + libpq-dev postgresql \ python3-pip \ \ && \ rm -rf /var/lib/apt/lists/* -# -# Build exchange -# -RUN mkdir /build && cd /build && \ - git clone git://taler.net/exchange.git && \ - cd exchange && \ - ./bootstrap && ./configure --prefix=$PREFIX && make && make install && \ - rm -rf /build - -# -# Build merchant -# -RUN mkdir /build && cd /build && \ - git clone git://taler.net/merchant.git && \ - cd merchant && \ - ./bootstrap && ./configure --prefix=$PREFIX && make && make install && \ - rm -rf /build - RUN pip3 install -U pip -# -# Build bank -# -RUN mkdir /build && cd /build && \ - git clone git://taler.net/bank.git && \ - cd bank && \ - ./bootstrap && ./configure --prefix=$PREFIX && make && make install && \ - rm -rf /build +RUN git clone git://taler.net/deployment \ + && \ + deployment/bootstrap-hybrid + +RUN $HOME/deployment/taler-build/invalidate.sh \ + && \ + cd $HOME/deployment/taler-build && make; + +# cannot get $HOME to work +ENV PATH=/root/local/bin:$PATH + +RUN taler-config-generate -e -m -C PUDOS -m -e -w test \ + --bank-uri https://bank.test.taler.net \ + --exchange-bank-account 2 \ + --merchant-bank-account 3 \ + --trusted + +RUN service postgresql start \ + && \ + su -c 'psql -c "CREATE ROLE root WITH SUPERUSER LOGIN"' postgres \ + && \ + su -c 'psql -c "CREATE DATABASE taler WITH OWNER root"' postgres \ + && \ + su -c 'psql -c "CREATE DATABASE talermerchant WITH OWNER root"' postgres + +RUN printf '#!/bin/bash \n \ + taler-exchange-keyup \ + && taler-exchange-keycheck \ + && service postgresql start \ + && taler-exchange-dbinit \ + && taler-exchange-httpd' > $HOME/local/bin/launch_exchange.sh \ + && \ + chmod +x $HOME/local/bin/launch_exchange.sh + +RUN printf '#!/bin/bash \n \ + service postgresql start \ + && \ + taler-merchant-httpd' > $HOME/local/bin/launch_merchant.sh \ + && \ + chmod +x $HOME/local/bin/launch_merchant.sh -- cgit v1.2.3