summaryrefslogtreecommitdiff
path: root/docker/exchange/Dockerfile
blob: 4393fec0ed2576729fd671145ebc686539247a8a (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
FROM taler/base

RUN git clone git://taler.net/exchange ~/exchange

WORKDIR $HOME/exchange

RUN ./bootstrap \
    && ./configure CFLAGS='-ggdb -O0' \
        --with-libgnurl=/usr/local \
        --with-microhttpd=/usr/local \
        --with-gnunet=/usr/local \
    && make \
    && make install
 
RUN su -c "createuser --host=dbcontainer root" postgres \
    && su -c "createdb --host=dbcontainer talertest" postgres

RUN mkdir -p $HOME/shared-data/exchange/offline-keys/ \
    && gnunet-ecc -g1 $HOME/shared-data/exchange/offline-keys/master.priv \
    && taler-config -s exchangedb-postgres -o db_conn_str \
       -V "dbname=talertest host=dbcontainer" \
    && taler-config -s exchange -o serve -V tcp \
    && taler-config -s exchange -o master_public_key \
       -V $(gnunet-ecc -p $HOME/shared-data/exchange/offline-keys/master.priv)

RUN $HOME/deployment/bin/taler-deployment-config-sign \
    && $HOME/deployment/bin/taler-deployment-keyup \
    && taler-exchange-dbinit -r