forked from singnet/example-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (27 loc) · 1.06 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
FROM ubuntu:18.04
ARG git_owner="singnet"
ARG git_branch="master"
ARG snetd_version
ENV SINGNET_REPOS=/opt/singnet
RUN mkdir -p ${SINGNET_REPOS}
RUN apt-get update && \
apt-get install -y \
curl \
nano \
git \
wget
RUN apt-get install -y python3 python3-pip
# SNET Daemon
RUN SNETD_GIT_VERSION=`curl -s https://api.github.com/repos/singnet/snet-daemon/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")' || echo "v3.1.6"` && \
SNETD_VERSION=${snetd_version:-${SNETD_GIT_VERSION}} && \
cd /tmp && \
wget https://github.com/singnet/snet-daemon/releases/download/${SNETD_VERSION}/snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz && \
tar -xvf snet-daemon-${SNETD_VERSION}-linux-amd64.tar.gz && \
mv snet-daemon-${SNETD_VERSION}-linux-amd64/snetd /usr/bin/snetd && \
rm -rf snet-daemon-*
RUN cd ${SINGNET_REPOS} && \
git clone -b ${git_branch} https://github.com/${git_owner}/example-service.git && \
cd example-service && \
pip3 install -r requirements.txt && \
sh buildproto.sh
WORKDIR ${SINGNET_REPOS}/example-service