-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(tools/docker): stop compiling Iroha as part of the all-in-one imag…
…e build 1. Upgraded the Iroha AIO image to use v1.4.0-patch-3 2. The new Iroha version now supports configuraton via ENV variables 3. Because of 2) we don't need to apply config file changes in the entrypoint script of the container anymore, yay. 4. The new image uses the iroha release image as the base and it does NOT recompile the entire project which makes the build orders of magnitude faster, wasting much less CI time/resources. 5. Exposed the healthcheck port for through the IrohaTestLedger class so the other improvement we'll be able to do after this is to phase out the hacky python script that does the healthcheck at the moment if the new built-in healthcheck endpoint does actually work fine. 6. Migrated all the test cases to the new image version. Fixes #2524 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
5 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,24 @@ | ||
FROM ubuntu:20.04 as builder | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
FROM hyperledger/iroha:1.4.0-patch-3 | ||
|
||
RUN set -e && apt-get update && apt-get install -y --no-install-recommends \ | ||
file build-essential ninja-build ca-certificates tar curl unzip cmake pkg-config zip software-properties-common | ||
|
||
RUN add-apt-repository ppa:git-core/ppa | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends git | ||
|
||
RUN git clone https://github.com/hyperledger/iroha.git -b 1.4.0 | ||
RUN iroha/vcpkg/build_iroha_deps.sh | ||
RUN /vcpkg-build/vcpkg integrate install | ||
WORKDIR /iroha/build/ | ||
|
||
RUN cmake -DCMAKE_TOOLCHAIN_FILE=/vcpkg-build/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TYPE=Release -DPACKAGE_DEB=ON -G "Ninja" .. | ||
RUN cmake --build . --target package -- -j$(nproc) | ||
|
||
FROM ubuntu:20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN set -e && apt-get update && \ | ||
apt-get install -y moreutils jq python3 python3-pip && \ | ||
apt-get install -y moreutils jq wget python3 python3-pip && \ | ||
pip install iroha && \ | ||
apt-get purge -y `apt-get -s purge python3-pip | grep '^ ' | tr -d '*'` && \ | ||
apt-get -y clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
# irohad is the core of Iroha ledger | ||
COPY --from=builder /iroha/build/bin/irohad /usr/bin/irohad | ||
# copying iroha-cli optional; only copied for debugging purpose | ||
COPY --from=builder /iroha/build/bin/iroha-cli /usr/bin/iroha-cli | ||
# files below are necessary | ||
COPY --from=builder /iroha/example/ /opt/iroha_data/ | ||
COPY --from=builder /iroha/docker/release/wait-for-it.sh / | ||
|
||
COPY genesis.block /opt/iroha_data/genesis.block | ||
COPY entrypoint.sh healthcheck.py / | ||
RUN chmod +x /entrypoint.sh /wait-for-it.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
WORKDIR /opt/iroha_data | ||
|
||
RUN wget https://raw.githubusercontent.com/hyperledger/iroha/v1.4.0-patch-3/example/admin%40test.pub --output-document=admin@test.pub | ||
RUN wget https://raw.githubusercontent.com/hyperledger/iroha/v1.4.0-patch-3/example/admin%40test.priv --output-document=admin@test.priv | ||
RUN wget https://raw.githubusercontent.com/hyperledger/iroha/v1.4.0-patch-3/example/node0.pub | ||
RUN wget https://raw.githubusercontent.com/hyperledger/iroha/v1.4.0-patch-3/example/node0.priv | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
CMD ["irohad"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters