-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
22 lines (18 loc) · 950 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM gradle:latest
RUN apt-get update
RUN apt-get install postgresql sudo -y
RUN git clone https://github.com/C-Otto/lnd-manageJ.git
WORKDIR lnd-manageJ
RUN gradle application:bootJar
RUN mkdir -p /root/.config
RUN echo "[lnd]" >> /root/.config/lnd-manageJ.conf
RUN echo "host=localhost" >> /root/.config/lnd-manageJ.conf
RUN echo "macaroon_file=/root/.lnd/data/chain/bitcoin/testnet/admin.macaroon" >> /root/.config/lnd-manageJ.conf
EXPOSE 8081
RUN echo "server.address=0.0.0.0" >> /root/override.properties
CMD /etc/init.d/postgresql start && \
(sudo -u postgres psql -c "CREATE USER bitcoin WITH PASSWORD 'unset'" || true) && \
(sudo -u postgres createdb lndmanagej -O bitcoin || true) && \
java -jar application/build/libs/application-boot.jar --spring.config.location=classpath:application.properties,/root/override.properties
# docker build -t lnd-managej .
# docker run --network host -v /home/xxx/.lnd/:/root/.lnd lnd-managej