summaryrefslogtreecommitdiff
path: root/docker/taler-full/Dockerfile
blob: af73d5c5eeff9c30c852d97c65c33e2e27992f82 (plain)
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
56
57
58
59
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/*

RUN pip3 install -U pip

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