This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
forked from litepresence/BitShares-Gateway
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
59 lines (48 loc) · 1.47 KB
/
Dockerfile
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 ubuntu:focal
##
## BitShares Gateway
##
## build:
## docker build -t bitshares-gateway .
##
## run: (development)
## docker run -it --rm -p 4018:4018 --name BitSharesGateTest bitshares-gateway
##
## run: (production)
## docker run -d -p 4018:4018 --restart=never --name BitSharesGateway bitshares-gateway
##
## Note: restart policy is "never" until sure an automatic restart
## wouldn't result in deposits intended for one recipient being
## routed to another.
##
## Config Files:
##
## The config/ dir should contain files nodes.py and config.py customized
## for the intended deployment. These may be modeled after config-sample.py
## and nodes-sample.py in the app/ directory. The configpath argument may be
## overridden at build time to pull config files from a different location.
##
ARG configpath=config
##
## Set up basic Python3 environment:
##
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3 \
python3-pip python3-pkgconfig
##
## Install dependencies for BitShares Gateway:
##
WORKDIR /usr/src/init
COPY apt-packages.txt .
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
$(grep -vE "^\s*#" apt-packages.txt | tr "\n" " ")
COPY requirements.txt .
RUN pip3 install -r requirements.txt
##
## Install and configure BitShares Gateway app:
##
WORKDIR /usr/src/app
COPY app/ .
COPY $configpath/ .
RUN echo python3 -u Gateway.py >> ~/.bash_history
CMD ["bash"]
#CMD ["python3", "-u", "Gateway.py"]