forked from crytic/solc-select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (38 loc) · 1.43 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
#FROM alpine:latest
# Hack: Extend from the official solc container.
# We really don't need to extend from this, but
# it also extends from alpine, and this allows
# us to have solc-select auto-rebuilt on Dockerhub
# every time the official solc Docker image is rebuilt.
# As a bonus, we also get the nightly build of `solc`.
FROM ethereum/solc:nightly-alpine
MAINTAINER Evan Sultanik
USER root
# First, move the preexisting nightly build we inherited from the official image into place:
RUN mv /usr/local/bin/solc /usr/bin/solc-vnightly
RUN apk update
RUN apk upgrade
RUN apk add bash curl
# Install all versions of solc
COPY scripts/install_solc.sh /
COPY scripts/semver.sh /
RUN bash /install_solc.sh
RUN rm /install_solc.sh /semver.sh
# Install the solc-selection script:
COPY scripts/solc-select /usr/bin/
# solc-select requires a newer version of `find`:
RUN apk -U add findutils
# Select the latest, non-nightly-build version of solc as the default:
RUN solc-select --list | grep -v nightly | tail -n1 | xargs solc-select
COPY scripts/solc /usr/bin/
COPY scripts/solc-wrapper /usr/bin/
COPY scripts/chroot.sh /usr/bin/
COPY scripts/install.sh /usr/bin/
COPY bin/solc /etc/solc_template
RUN cat /etc/solc_template >> /usr/bin/install.sh
RUN echo EOF >> /usr/bin/install.sh
RUN echo finalize >> /usr/bin/install.sh
RUN rm /etc/solc_template
RUN mkdir -p /workdir
WORKDIR /workdir
ENTRYPOINT ["/usr/bin/solc-wrapper"]