-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (20 loc) · 993 Bytes
/
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
FROM python:3.6-slim
# Create user and change cwd
ARG USERNAME=dockerman
RUN useradd -ms /bin/bash $USERNAME
WORKDIR /home/$USERNAME
# Install python-bitshares prerequisites
RUN apt-get update && apt-get install -y libssl-dev g++ libffi-dev
# Used for debugging only
RUN apt-get install -y net-tools curl wget procps nano
# Setup app + gunicorn
COPY requirements.txt ./
RUN python -m venv venv
RUN venv/bin/pip install --upgrade pip
RUN venv/bin/pip install -r requirements.txt
# Bug fix. Forcing the use of node.testnet.bitshares.eu
RUN grep -Rli 'wss://node.testnet.bitshares.eu' * | xargs -i@ sed -i 's/wss:\/\/node.bitshares.eu/wss:\/\/node.testnet.bitshares.eu/g' @
# Patching transaction builder
RUN wget -O venv/lib/python3.6/site-packages/bitshares/transactionbuilder.py https://raw.githubusercontent.com/bitshares/python-bitshares/27701d4f9d92ee2eecdc8001633083f856546820/bitshares/transactionbuilder.py
COPY run.py ./
ENTRYPOINT ["/home/dockerman/venv/bin/python", "run.py"]