forked from prasadpgowda/elastos-smartweb-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 844 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 844 Bytes
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
FROM ubuntu:18.04
RUN apt-get update -y && \
apt-get install software-properties-common python3.8 python3.8-dev python3-pip -y && \
add-apt-repository ppa:ethereum/ethereum && \
apt-get update -y && \
apt-get install solc -y
RUN pip3 install virtualenv
RUN virtualenv -p /usr/bin/python3.8 /venv
RUN . venv/bin/activate
ENV SRC_DIR /elastos-smartweb-service
# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV /venv
ENV PATH /venv/bin:$PATH
ENV PYTHONPATH="${PYTHONPATH}:${SRC_DIR}/grpc_adenine/stubs/"
WORKDIR ${SRC_DIR}
ADD requirements.txt ${SRC_DIR}/requirements.txt
RUN pip install -r requirements.txt
ADD grpc_adenine ${SRC_DIR}/grpc_adenine
ADD .env ${SRC_DIR}/.env
ADD run.sh ${SRC_DIR}/run.sh
EXPOSE 8001
ENTRYPOINT ["python", "./grpc_adenine/server.py"]