diff --git a/Makefile b/Makefile index d3cb096c..d6367a04 100644 --- a/Makefile +++ b/Makefile @@ -157,6 +157,9 @@ docs-dev: configure @echo "Building Documentation" cmake --build build/release --target=serve_docs --config=Release +docker-chain-node: + @echo "Building docker image: lthn/chain" + docker build utils/docker/images/lthn-chain -t lthn/chain $(CURDIR) clean: rm -rf build @@ -164,4 +167,4 @@ clean: tags: ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest -.PHONY: all release debug docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect $(PROFILES) +.PHONY: all release docker-chain-node debug docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect $(PROFILES) diff --git a/docs b/docs index 93d4f46c..8149379b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 93d4f46cdac8ba499cbb2d7819a472d66e209127 +Subproject commit 8149379b068681eb1d9664b54efe61fafc98b292 diff --git a/utils/docker/images/lthn-chain/Dockerfile b/utils/docker/images/lthn-chain/Dockerfile index f62250c4..0a79e0cc 100644 --- a/utils/docker/images/lthn-chain/Dockerfile +++ b/utils/docker/images/lthn-chain/Dockerfile @@ -1,4 +1,4 @@ -# This is a multi target docker image +# use --target=builder to return a docker image able to compile the software, probbly used with -v .:/code FROM ubuntu:24.04 AS builder LABEL authors="snider" @@ -9,7 +9,7 @@ ARG BUILD_REPO=https://github.com/letheanVPN/blockchain.git ARG BUILD_TARGET=gcc-linux-armv8 ARG BUILD_FOLDER=build/release ARG BUILD_TYPE=Release -ARG BUILD_TESTNET=0 +ARG BUILD_TESTNET=1 ENV CONAN_HOME=/root/sdk @@ -56,13 +56,15 @@ RUN if [ "$BUILD_TESTNET" = "1" ]; then \ done; \ fi - +# use --target=build-cache to return just the cache files FROM scratch AS build-cache COPY --from=builder ${CONAN_HOME} / +# use --target=build-artifacts to return the binaries FROM scratch AS build-artifacts COPY --from=builder /code/build/release/src/lethean-* / +# use --target=chain-service to return a working chain node FROM ubuntu:24.04 AS chain-service COPY --from=build-artifacts --chmod=+x / /bin