-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (34 loc) · 1.47 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
# Set timezone
RUN echo "Asia/Singapore" > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata
RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y git yasm curl zip \
make g++ python-dev net-tools ca-certificates build-essential libboost-all-dev libssl-dev \
libcurl4-openssl-dev libdb-dev libdb++-dev libgmp-dev libminiupnpc-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV HOME /diamond
RUN useradd -s /bin/bash -m -d /diamond diamond
RUN chown diamond:diamond -R /diamond
ADD ./bin /usr/local/bin
RUN chmod a+x /usr/local/bin/*
USER diamond
VOLUME ["/diamond"]
RUN git clone https://github.com/DMDcoin/diamond.git ./app && mkdir -p ./app/src/obj
WORKDIR ./app/src
RUN make -f makefile.unix USE_UPNP=- -e PIE=1 && sudo cp diamondd /usr/local/bin && cd ../../ && rm -rf ./app
EXPOSE 17771 17772
CMD ["dmd_oneshot"]
#WORKDIR /
#ADD dmd/ /data/dmd/
#ADD staking.sh /
#RUN chmod 700 /data/dmd
#RUN mkdir app
#RUN git clone https://github.com/DMDcoin/diamond.git /app && mkdir -p /app/src/obj
#WORKDIR /app/src
#RUN make -f makefile.unix USE_UPNP=1 -e PIE=1 && cp diamondd /usr/local/bin && echo "Build complete."
#WORKDIR /data/dmd
#VOLUME ["/data/dmd"]
#CMD ["/usr/bin/sh", "staking.sh"]
# RUN chmod +x /usr/local/bin/diamondd && rm -rf /app