Refactor Dockerfile, Add TODOs
all these changelogs only apply to the Docker image. Changelog-Added: added verification of GPG keys for the bitcoin and litecoin tarballs. Changelog-Fixed: fixed compilation on all target architectures; each had their own bugs (poetry, missing packages...). Changelog-Fixed: fixed cargo cross compilation. it was mistakenly using QEMU before. Changelog-Fixed: fixed CPU compatibility bug described in issue 8456 Changelog-Changed: improve build time by 8.8x Changelog-Changed: improve image size by 2.07x more detailed changelog can be found on the PR: https://github.com/ElementsProject/lightning/pull/8429
This commit is contained in:
committed by
ShahanaFarooqui
parent
9fe8f3ab2e
commit
13c5db51a9
@@ -34,7 +34,7 @@ ALL_TARGETS="bin-Fedora bin-Ubuntu docker sign"
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
--force-version=*)
|
||||
FORCE_VERSION=${arg#*=}
|
||||
FORCE_VERSION=${arg#*=}
|
||||
;;
|
||||
--force-unclean)
|
||||
FORCE_UNCLEAN=true
|
||||
@@ -54,10 +54,10 @@ for arg; do
|
||||
--help)
|
||||
echo "Usage: [--force-version=<ver>] [--force-unclean] [--force-mtime=YYYY-MM-DD] [--verify] [TARGETS]"
|
||||
echo Known targets: "$ALL_TARGETS"
|
||||
echo "Example: tools/build-release.sh"
|
||||
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora bin-Ubuntu sign"
|
||||
echo "Example: tools/build-release.sh --verify"
|
||||
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 --verify"
|
||||
echo "Example: tools/build-release.sh"
|
||||
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora bin-Ubuntu sign"
|
||||
echo "Example: tools/build-release.sh --verify"
|
||||
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 --verify"
|
||||
echo "Example: tools/build-release.sh docker"
|
||||
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 docker"
|
||||
exit 0
|
||||
@@ -91,9 +91,9 @@ fi
|
||||
case "$VERSION" in
|
||||
v*) ;;
|
||||
*)
|
||||
echo "Version must begin with v! Not $VERSION" >&2
|
||||
exit 1
|
||||
;;
|
||||
echo "Version must begin with v! Not $VERSION" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# `status --porcelain -u no` suppressed modified! Bug reported...
|
||||
@@ -119,7 +119,7 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
|
||||
ALL_TARGETS="bin-Ubuntu"
|
||||
else
|
||||
echo "Unable to verify. File SHA256SUMS-$VERSION or SHA256SUMS-$VERSION.asc not found in the root."
|
||||
exit 1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -212,7 +212,7 @@ if [ -z "${TARGETS##* docker *}" ]; then
|
||||
DOCKER_OPTS="--push --platform linux/amd64,linux/arm64,linux/arm/v7"
|
||||
DOCKER_OPTS="$DOCKER_OPTS -t $DOCKER_USER/lightningd:$VERSION"
|
||||
DOCKER_OPTS="$DOCKER_OPTS -t $DOCKER_USER/lightningd:latest"
|
||||
DOCKER_OPTS="$DOCKER_OPTS --cache-to=type=local,dest=/tmp/docker-cache --cache-from=type=local,src=/tmp/docker-cache"
|
||||
DOCKER_OPTS="$DOCKER_OPTS --cache-to=type=local,dest=/tmp/docker-cache --cache-from=type=local,src=/tmp/docker-cache"
|
||||
echo "Docker Options: $DOCKER_OPTS"
|
||||
if $SUDO docker buildx ls | grep -q 'cln-builder'; then
|
||||
$SUDO docker buildx use cln-builder
|
||||
@@ -259,7 +259,7 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
|
||||
echo "SHA256SUMS are Identical"
|
||||
else
|
||||
echo "Error: SHA256SUMS do NOT Match"
|
||||
exit 1
|
||||
exit 1
|
||||
fi
|
||||
# verify release captain signature
|
||||
gpg --verify "../SHA256SUMS-$VERSION.asc"
|
||||
|
||||
Reference in New Issue
Block a user