forked from rainbreak/solidity-static
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 932 Bytes
/
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
FROM alpine
RUN apk --no-cache --update add build-base cmake boost-dev git file
# stop boost complaining about sys/poll.h
RUN sed -i -E -e 's/include <sys\/poll.h>/include <poll.h>/' /usr/include/boost/asio/detail/socket_types.hpp
WORKDIR /src
RUN git clone https://github.com/open-source-parsers/jsoncpp.git
RUN git clone https://github.com/ethereum/solidity
# alpine has jsoncpp-dev, but it doesn't provide static libs
RUN cd jsoncpp \
&& cmake -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF . \
&& make jsoncpp_lib_static \
&& make install
WORKDIR /src/solidity/build
RUN git checkout v0.3.6
RUN cmake -DCMAKE_BUILD_TYPE=Release \
-DTESTS=1 \
-DSTATIC_LINKING=1 \
..
RUN make --jobs=2 solc soltest
RUN install -s solc/solc /usr/local/bin
RUN install -s test/soltest /usr/local/bin
RUN file /usr/local/bin/solc /usr/local/bin/soltest
RUN du -h /usr/local/bin/solc /usr/local/bin/soltest