@@ -102,6 +102,17 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
102102 git checkout .; \g it checkout .; \
103103 git checkout develop; \
104104 git clean -d -x -f; \
105+ # build solc-v0.8.26
106+ git checkout v0.8.26; \
107+ # there is no sudo in the container, but we are under root so we do not need it
108+ grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g' ; \
109+ # build solc faster
110+ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g' ; \
111+ ./scripts/build.sh; \
112+ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.26; \
113+ git checkout .; \g it checkout .; \
114+ git checkout develop; \
115+ git clean -d -x -f; \
105116 # build solc-v0.8.10
106117 git checkout v0.8.10; \
107118 # the compiler throws warnings when compiling this version, and the warnings are treated as errors.
@@ -265,14 +276,11 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
265276
266277
267278# init script that runs when the container is started for the very first time
268- # it will install poetry, yarn libs and init brownie networks
279+ # it will install poetry, yarn libs, init brownie networks and core repository
269280WORKDIR /root/scripts
270- RUN touch /root/init.sh
271- RUN echo "if [ ! -e /root/inited ]; then \n touch /root/inited \n poetry install \n yarn \n poetry run brownie networks import network-config.yaml True \n fi" > /root/init.sh
272- RUN chmod +x /root/init.sh
273281
274-
275- # set default working dir for tty
282+ COPY docker-init.sh /root/init.sh
283+ RUN chmod +x /root/init.sh
276284RUN echo "cd /root/scripts" >> /root/.bashrc
277285
278286
@@ -288,6 +296,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.5.14 --version | g
288296RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.5.12 --version | grep 'Version: 0.5.12+commit.7709ece9' || (echo "Incorrect solc-v0.5.12 version" && exit 1) fi
289297RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.6.12 --version | grep 'Version: 0.6.12+commit.27d51765' || (echo "Incorrect solc-v0.6.12 version" && exit 1) fi
290298RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.28 --version | grep 'Version: 0.8.28+commit.7893614a' || (echo "Incorrect solc-v0.8.28 version" && exit 1) fi
299+ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.26 --version | grep 'Version: 0.8.26+commit.8a97fa7' || (echo "Incorrect solc-v0.8.26 version" && exit 1) fi
291300RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.10 --version | grep 'Version: 0.8.10+commit.fc410830' || (echo "Incorrect solc-v0.8.10 version" && exit 1) fi
292301RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.9 --version | grep 'Version: 0.8.9+commit.e5eed63a' || (echo "Incorrect solc-v0.8.9 version" && exit 1) fi
293302RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.4 --version | grep 'Version: 0.8.4+commit.c7e474f2' || (echo "Incorrect solc-v0.8.4 version" && exit 1) fi
@@ -301,4 +310,4 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep
301310
302311
303312# run init script and sleep to keep the container running
304- CMD ["/bin/bash" , "-c" , "/root/init.sh && sleep infinity" ]
313+ CMD ["/bin/bash" , "-c" , "/root/init.sh develop && sleep infinity" ]
0 commit comments