forked from lthn/blockchain
Add docker build target for lthn-chain node
Introduces a new Makefile target 'docker-chain-node' to build the lthn/chain Docker image. Updates the lthn-chain Dockerfile with improved comments, sets BUILD_TESTNET=1 by default, and clarifies multi-stage build targets. Also updates the docs submodule reference.
This commit is contained in:
parent
4dfda9a1c7
commit
10bdc49525
3 changed files with 10 additions and 5 deletions
5
Makefile
5
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)
|
||||
|
|
|
|||
2
docs
2
docs
|
|
@ -1 +1 @@
|
|||
Subproject commit 93d4f46cdac8ba499cbb2d7819a472d66e209127
|
||||
Subproject commit 8149379b068681eb1d9664b54efe61fafc98b292
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue