-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
38 lines (28 loc) · 932 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
29
30
31
32
33
34
35
36
37
38
# Docker file for python in ubuntu
FROM ubuntu:18:04
WORKDIR /ethdkg
COPY . /ethdkg
# Add a user given as build argument
ARG UNAME=user
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
# basic python setup
RUN apt-get update \
&& apt-get install -y python3.8 python3.8-dev \
&& apt-get install -y python3-pip \
&& python3.8 -m pip install --upgrade pip
# requirements for building underlying packages
# e.g., secp256k1
RUN apt-get install -y build-essential pkg-config autoconf libtool libssl-dev libffi-dev libgmp-dev libsecp256k1-0 libsecp256k1-dev
# install some tools for debugging
RUN apt-get install -y git wget vim iputils-ping netcat iproute2
# install requirements
RUN cd /ethdkg/ \
&& python3.8 -m pip install -r requirements.txt
# install ethdkg python package
RUN pip install -e /ethdkg
#change final user
USER $UNAME
CMD ["/bin/bash"]