-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
99 lines (79 loc) · 2.02 KB
/
Dockerfile
File metadata and controls
99 lines (79 loc) · 2.02 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
FROM debian:jessie as builder
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV TERM=xterm
ENV DEBIAN_FRONTEND=noninteractive
ARG TARGET=/tmp/build
ARG BRANCH=tokennet
RUN ( \
sed -i -e 's/deb.debian.org/ftp.kr.debian.org/g' /etc/apt/sources.list; \
apt-get update --fix-missing && \
apt-get -y dist-upgrade; \
)
RUN ( \
apt-get -y install locales; \
echo en_US.UTF-8 UTF-8 > /etc/locale.gen && locale-gen \
)
WORKDIR /tmp
RUN ( \
apt-get -y install \
git \
build-essential \
pkg-config \
autoconf \
automake \
libtool \
bison \
flex \
libpq-dev \
clang++-3.5 \
gcc-4.9 \
g++-4.9 \
cpp-4.9 \
; \
)
RUN ( \
echo ${BRANCH}; \
git clone https://github.com/owlchain/tokennet-core.git /tmp/tokennet-core; \
cd /tmp/tokennet-core; \
git checkout ${BRANCH}; \
)
WORKDIR /tmp/tokennet-core
RUN ( \
git submodule init; \
git submodule update; \
)
RUN ( \
./autogen.sh; \
CXX=g++-4.9 ./configure --prefix=${TARGET:-/tmp/build} && \
make && \
make check && \
make install; \
)
RUN cat src/StellarCoreVersion.h | grep STELLAR_CORE_VERSION | sed -e "s/.* \"//g" -e 's/-.*//g' > /version.txt
RUN git rev-parse --short HEAD 2>/dev/null > /commit.txt
FROM debian:jessie-slim
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV TERM=xterm
ENV DEBIAN_FRONTEND=noninteractive
RUN ( \
sed -i -e 's/deb.debian.org/ftp.kr.debian.org/g' /etc/apt/sources.list; \
apt-get -y update && \
apt-get -y dist-upgrade; \
)
RUN apt-get -y install curl locales libpq5 ntp ntpdate
RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen && locale-gen
RUN ( \
apt-get -y autoremove; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
)
WORKDIR /
COPY --from=builder /version.txt /version.txt
COPY --from=builder /commit.txt /commit.txt
COPY --from=builder /tmp/build/bin/stellar-core /tokennet-core
ADD ./init /init
RUN chmod 700 /init
ENTRYPOINT ["/init"]
# vim: set ft=dockerfile: