forked from bulwark-crypto/Bulwark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
246 lines (239 loc) · 8.09 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
FROM ubuntu:16.04 AS dependencies
COPY depends /Bulwark/depends
ENV SDK_PATH=/Bulwark/depends/SDKs/
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
software-properties-common=0.96.20.7 \
&& add-apt-repository -y ppa:bitcoin/bitcoin \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
autoconf=2.69-9 \
automake=1:1.15-4ubuntu1 \
autotools-dev=20150820.1 \
binutils-mingw-w64-i686=2.26-3ubuntu1+6.6 \
binutils-mingw-w64-x86-64=2.26-3ubuntu1+6.6 \
bsdmainutils=9.0.6ubuntu3 \
build-essential=12.1ubuntu2 \
ca-certificates=20170717~16.04.1 \
cmake=3.5.1-1ubuntu3 \
curl=7.47.0-1ubuntu2.9 \
faketime=0.9.6-4 \
g++-5-multilib-arm-linux-gnueabihf=5.4.0-6ubuntu1~16.04.9cross1 \
g++-5-multilib=5.4.0-6ubuntu1~16.04.10 \
g++-arm-linux-gnueabihf=4:5.3.1-1ubuntu1 \
g++-mingw-w64-i686=5.3.1-8ubuntu3+17 \
g++-mingw-w64-x86-64=5.3.1-8ubuntu3+17 \
gcc-5-multilib-arm-linux-gnueabihf=5.4.0-6ubuntu1~16.04.9cross1 \
gcc-5-multilib=5.4.0-6ubuntu1~16.04.10 \
git-core=1:2.7.4-0ubuntu1.5 \
imagemagick=8:6.8.9.9-7ubuntu5.13 \
libboost-all-dev=1.58.0.1ubuntu1 \
libbz2-dev=1.0.6-8 \
libbz2-dev=1.0.6-8 \
libc6-dev:i386=2.23-0ubuntu10 \
libc6-dev=2.23-0ubuntu10 \
libcap-dev=1:2.24-12 \
libdb4.8-dev=4.8.30-xenial4 \
libdb4.8++-dev=4.8.30-xenial4 \
libevent-dev=2.0.21-stable-2ubuntu0.16.04.1 \
libjpeg-dev=8c-2ubuntu8 \
libminiupnpc-dev=1.9.20140610-2ubuntu2.16.04.2 \
libprotobuf-dev=2.6.1-1.3 \
libqrencode-dev=3.4.4-1 \
libqt5core5a=5.5.1+dfsg-16ubuntu7.5 \
libqt5dbus5=5.5.1+dfsg-16ubuntu7.5 \
libqt5gui5=5.5.1+dfsg-16ubuntu7.5 \
librsvg2-bin=2.40.13-3 \
libssl-dev=1.0.2g-1ubuntu4.13 \
libtiff-tools=4.0.6-1ubuntu0.4 \
libtool=2.4.6-0.1 \
libz-mingw-w64-dev=1.2.8+dfsg-2 \
libzmq-dev=2.2.0+dfsg-7 \
libzmq5=4.1.4-7 \
linux-libc-dev:i386=4.4.0-138.164 \
linux-libc-dev=4.4.0-138.164 \
mingw-w64-i686-dev=4.0.4-2 \
mingw-w64-x86-64-dev=4.0.4-2 \
openssl=1.0.2g-1ubuntu4.13 \
pkg-config=0.29.1-0ubuntu1 \
protobuf-compiler=2.6.1-1.3 \
python-dev=2.7.12-1~16.04 \
python-setuptools=20.7.0-1 \
qttools5-dev-tools=5.5.1-3ubuntu0.1 \
qttools5-dev=5.5.1-3ubuntu0.1 \
unzip=6.0-20ubuntu1 \
wget=1.17.1-1ubuntu1.4 \
zlib1g-dev=1:1.2.8.dfsg-2ubuntu4.1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix \
&& update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix \
&& wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.11.sdk.tar.xz -P /Bulwark/depends/SDKs/ \
&& tar xJf /Bulwark/depends/SDKs/MacOSX10.11.sdk.tar.xz -C /Bulwark/depends/SDKs/ \
&& rm /Bulwark/depends/SDKs/MacOSX10.11.sdk.tar.xz \
&& wget https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip install ez_setup==0.9 \
&& make -C /Bulwark/depends HOST=arm-linux-gnueabihf \
&& make -C /Bulwark/depends HOST=i686-pc-linux-gnu \
&& make -C /Bulwark/depends HOST=i686-w64-mingw32 \
&& make -C /Bulwark/depends HOST=x86_64-unknown-linux-gnu \
&& make -C /Bulwark/depends HOST=x86_64-w64-mingw32
FROM dependencies AS base
COPY autogen.sh /Bulwark/
COPY build-aux /Bulwark//build-aux
COPY configure.ac /Bulwark/
COPY contrib /Bulwark//contrib
COPY Makefile.am /Bulwark/
COPY pkg.m4 /Bulwark/
COPY qa /Bulwark/qa
COPY share /Bulwark/share
COPY src /Bulwark/src
WORKDIR /Bulwark
FROM base AS arm32
ENV CXXFLAGS="-Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-narrowing"
COPY --from=dependencies /Bulwark/depends/arm-linux-gnueabihf $(pwd)/depends/arm-linux-gnueabihf
RUN ./autogen.sh \
&& ./configure \
--enable-zmq \
--enable-glibc-back-compat \
--enable-reduce-exports \
--disable-shared \
--enable-hardening \
--disable-tests \
--with-miniupnpc \
--enable-upnp-default \
--prefix="$(pwd)/depends/arm-linux-gnueabihf" \
--build=x86_64-unknown-linux-gnu \
--host=arm-linux-gnueabihf \
&& make \
&& cp ./src/bulwark-cli ./src/bulwarkd ./src/qt/bulwark-qt / \
&& make clean
WORKDIR /
RUN arm-linux-gnueabihf-strip ./bulwark-cli ./bulwark-qt ./bulwarkd \
&& tar czf arm32.tar.gz ./bulwark* \
&& rm ./bulwark-cli ./bulwark-qt ./bulwarkd
FROM base AS linux32
ENV CXXFLAGS="-Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-narrowing"
COPY --from=dependencies /Bulwark/depends/i686-pc-linux-gnu $(pwd)/depends/i686-pc-linux-gnu
RUN ./autogen.sh \
&& ./configure \
--enable-zmq \
--with-pic \
--enable-glibc-back-compat \
--enable-reduce-exports \
--disable-shared \
--enable-hardening \
--disable-tests \
--with-miniupnpc \
--enable-upnp-default \
--prefix="$(pwd)/depends/i686-pc-linux-gnu" \
--build=x86_64-unknown-linux-gnu \
--host=i686-pc-linux-gnu \
&& make \
&& cp ./src/bulwark-cli ./src/bulwarkd ./src/qt/bulwark-qt / \
&& make clean
WORKDIR /
RUN strip ./bulwark-cli ./bulwark-qt ./bulwarkd \
&& tar czf linux32.tar.gz ./bulwark* \
&& rm ./bulwark-cli ./bulwark-qt ./bulwarkd
FROM base AS linux64
ENV CXXFLAGS="-Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-narrowing"
ENV HOST="x86_64-unknown-linux-gnu"
COPY --from=dependencies /Bulwark/depends/x86_64-unknown-linux-gnu $(pwd)/depends/x86_64-unknown-linux-gnu
RUN ./autogen.sh \
&& ./configure \
--enable-zmq \
--with-pic \
--enable-glibc-back-compat \
--enable-reduce-exports \
--disable-shared \
--enable-hardening \
--disable-tests \
--with-miniupnpc \
--enable-upnp-default \
--prefix="$(pwd)/depends/x86_64-unknown-linux-gnu" \
--build=x86_64-unknown-linux-gnu \
--host=x86_64-unknown-linux-gnu \
&& make \
&& cp ./src/bulwark-cli ./src/bulwarkd ./src/qt/bulwark-qt / \
&& make clean
WORKDIR /
RUN strip ./bulwark-cli ./bulwark-qt ./bulwarkd \
&& tar czf linux64.tar.gz ./bulwark* \
&& rm ./bulwark-cli ./bulwark-qt ./bulwarkd
FROM base AS windows32
ENV CXXFLAGS="-Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-narrowing"
ENV HOST="i686-w64-mingw32"
COPY --from=dependencies /Bulwark/depends/i686-w64-mingw32 $(pwd)/depends/i686-w64-mingw32
COPY autogen.sh .
COPY build-aux ./build-aux
COPY configure.ac .
COPY contrib ./contrib
COPY Makefile.am .
COPY pkg.m4 .
COPY qa ./qa
COPY share ./share
COPY src ./src
RUN ./autogen.sh \
&& ./configure \
--enable-gui \
--enable-reduce-exports \
--disable-shared \
--with-pic \
--disable-tests \
--enable-upnp-default \
--prefix="$(pwd)/depends/i686-w64-mingw32" \
--build=x86_64-unknown-linux-gnu \
--host=i686-w64-mingw32 \
&& make \
&& cp ./src/bulwark-cli.exe ./src/bulwarkd.exe ./src/qt/bulwark-qt.exe / \
&& make clean
WORKDIR /
RUN strip ./bulwark-cli.exe ./bulwark-qt.exe ./bulwarkd.exe \
&& tar czf windows32.tar.gz ./bulwark* \
&& rm ./bulwark-cli.exe ./bulwark-qt.exe ./bulwarkd.exe
FROM base AS windows64
ENV CXXFLAGS="-Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-narrowing"
ENV HOST="x86_64-w64-mingw32"
COPY --from=dependencies /Bulwark/depends/x86_64-w64-mingw32 $(pwd)/depends/x86_64-w64-mingw32
COPY autogen.sh .
COPY build-aux ./build-aux
COPY configure.ac .
COPY contrib ./contrib
COPY Makefile.am .
COPY pkg.m4 .
COPY qa ./qa
COPY share ./share
COPY src ./src
RUN ./autogen.sh \
&& ./configure \
--enable-gui \
--enable-reduce-exports \
--disable-shared \
--with-pic \
--disable-tests \
--enable-upnp-default \
--prefix="$(pwd)/depends/x86_64-w64-mingw32" \
--build=x86_64-unknown-linux-gnu \
--host=x86_64-w64-mingw32 \
&& make \
&& cp ./src/bulwark-cli.exe ./src/bulwarkd.exe ./src/qt/bulwark-qt.exe / \
&& make clean
WORKDIR /
RUN strip ./bulwark-cli.exe ./bulwark-qt.exe ./bulwarkd.exe \
&& tar czf windows64.tar.gz ./bulwark* \
&& rm ./bulwark-cli.exe ./bulwark-qt.exe ./bulwarkd.exe
FROM alpine:3.8
LABEL maintainer="kewagi"
LABEL version="2.0.0.0"
LABEL name="Bulwark Docker Builds"
RUN mkdir /release
COPY --from=arm32 /arm32.* /release
COPY --from=linux32 /linux32.* /release
COPY --from=linux64 /linux64.* /release
COPY --from=windows32 /windows32.* /release
COPY --from=windows64 /windows64.* /release
ENTRYPOINT ["ash"]