Skip to content

Commit

Permalink
Install latest eldarica release on base ubuntu image
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Mar 25, 2024
1 parent afda698 commit ebc79bd
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
30 changes: 25 additions & 5 deletions scripts/docker/buildpack-deps/Dockerfile.ubuntu2004
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:focal AS base
LABEL version="21"
LABEL version="22"

ARG DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
apt-get update; \
apt-get install -qqy --no-install-recommends \
build-essential sudo \
Expand All @@ -40,7 +40,25 @@ RUN set -ex; \
libcvc4-dev libz3-static-dev z3-static jq \
; \
apt-get install -qy python3-pip python3-sphinx; \
pip3 install codecov; \
pip3 install codecov;

# Eldarica
RUN set -ex; \
apt-get update; \
apt-get install -qy unzip default-jre; \
download_url=$(curl \
--silent \
--location \
--fail \
--show-error \
https://api.github.com/repos/uuverifiers/eldarica/releases/latest \
| jq --raw-output '.assets[] | select(.content_type == "application/zip").browser_download_url'); \
curl --location "$download_url" -o /opt/eld_binaries.zip; \
unzip /opt/eld_binaries.zip -d /opt; \
rm -f /opt/eld_binaries.zip;

# Cleanup
RUN set -ex; \
rm -rf /var/lib/apt/lists/*

FROM base AS libraries
Expand All @@ -57,3 +75,5 @@ FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin
COPY --from=libraries /usr/include /usr/include
COPY --from=libraries /opt/eldarica /opt/eldarica
ENV PATH="$PATH:/opt/eldarica"
30 changes: 25 additions & 5 deletions scripts/docker/buildpack-deps/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
# (c) 2016-2019 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:jammy AS base
LABEL version="6"
LABEL version="7"

ARG DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
dist=$(grep DISTRIB_CODENAME /etc/lsb-release | cut -d= -f2); \
echo "deb http://ppa.launchpad.net/ethereum/cpp-build-deps/ubuntu $dist main" >> /etc/apt/sources.list ; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1c52189c923f6ca9 ; \
apt-get update; \
apt-get install -qqy --no-install-recommends \
build-essential sudo \
Expand All @@ -40,7 +40,25 @@ RUN set -ex; \
libcvc4-dev libz3-static-dev z3-static jq \
libcln-dev zip locales-all; \
apt-get install -qy python3-pip python3-sphinx; \
pip3 install codecov; \
pip3 install codecov;

# Eldarica
RUN set -ex; \
apt-get update; \
apt-get install -qy unzip default-jre; \
download_url=$(curl \
--silent \
--location \
--fail \
--show-error \
https://api.github.com/repos/uuverifiers/eldarica/releases/latest \
| jq --raw-output '.assets[] | select(.content_type == "application/zip").browser_download_url'); \
curl --location "$download_url" -o /opt/eld_binaries.zip; \
unzip /opt/eld_binaries.zip -d /opt; \
rm -f /opt/eld_binaries.zip;

# Cleanup
RUN set -ex; \
rm -rf /var/lib/apt/lists/*

FROM base AS libraries
Expand All @@ -61,3 +79,5 @@ FROM base
COPY --from=libraries /usr/lib /usr/lib
COPY --from=libraries /usr/bin /usr/bin
COPY --from=libraries /usr/include /usr/include
COPY --from=libraries /opt/eldarica /opt/eldarica
ENV PATH="$PATH:/opt/eldarica"

0 comments on commit ebc79bd

Please sign in to comment.