forked from iost-official/go-iost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
45 lines (36 loc) · 1.26 KB
/
Dockerfile.dev
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
FROM centos:7
ENV GOVERSION 1.10.1
# Install Git
RUN yum update -y && yum install wget git make gcc gcc-c++ kernel-devel redis -y
RUN git config --global user.name "IOST" && git config --global user.email "[email protected]"
# Install Redis
RUN \
cd /tmp && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
make install && \
cp -f src/redis-sentinel /usr/local/bin && \
mkdir -p /etc/redis && \
cp -f *.conf /etc/redis && \
rm -rf /tmp/redis-stable* && \
sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(logfile .*\)$/# \1/' /etc/redis/redis.conf
# Install Go
RUN mkdir /goroot && \
mkdir /gopath && \
curl https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz | \
tar xzf - -C /goroot --strip-components=1
ENV CGO_ENABLED 1
ENV GOPATH /gopath
ENV GOROOT /goroot
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH
# Install Python
RUN yum install -y epel-release
RUN yum install -y python python-devel python-pip
# Change redis conf
RUN sed -i 's/\#\ daemonize\ no/daemonize\ yes/g' /etc/redis/redis.conf
WORKDIR $GOPATH/src/github.com/iost-official/Go-IOS-Protocol
CMD ["make"]