From 996eaf223fa698e1961bb6af78092863fba57506 Mon Sep 17 00:00:00 2001 From: gusto Date: Thu, 9 Jul 2026 18:43:50 +0300 Subject: [PATCH] fix(docker): Fix docker version vars (#3115) --- .github/workflows/publish-node-image.yml | 15 ++++++++++++++- Dockerfile | 19 ++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-node-image.yml b/.github/workflows/publish-node-image.yml index 666e67284..f6a2089d8 100644 --- a/.github/workflows/publish-node-image.yml +++ b/.github/workflows/publish-node-image.yml @@ -4,10 +4,22 @@ on: release: types: [published, created] workflow_dispatch: + inputs: + lc_core_version: + description: 'LC Core Version' + required: false + default: '0.2.0' + type: string + lb_node_version: + description: 'LB Node Version' + required: true + type: string env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository_owner }}/logos-blockchain-node + LC_CORE_VERSION: ${{ inputs.lc_core_version }} + LB_NODE_VERSION: ${{ inputs.lb_node_version }} VERSION_TAG: ${{ github.ref_name }} LATEST_TAG: ${{ contains(github.ref_name, '-rc.') && 'latest-rc' || 'latest' }} @@ -57,7 +69,8 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - LB_NODE_VERSION=${{ env.VERSION_TAG }} + LC_CORE_VERSION=${{ env.LC_CORE_VERSION }} + LB_NODE_VERSION=${{ env.LB_NODE_VERSION }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }} diff --git a/Dockerfile b/Dockerfile index 6f6bba41d..e630e770e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ # check=skip=SecretsUsedInArgOrEnv # Ignore warnings about sensitive information as this is test data. -ARG CORE_VERSION=0.2.0 -ARG NODE_VERSION=0.2.0 +ARG LC_CORE_VERSION=0.2.0 +ARG LB_NODE_VERSION=0.2.0 # =========================== # BUILD IMAGE @@ -11,8 +11,8 @@ ARG NODE_VERSION=0.2.0 FROM debian:trixie-slim AS builder -ARG CORE_VERSION -ARG NODE_VERSION +ARG LC_CORE_VERSION +ARG LB_NODE_VERSION WORKDIR /logos-blockchain COPY . . @@ -22,14 +22,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ && rm -rf /var/lib/apt/lists/* -RUN scripts/setup-logos-core.sh "$CORE_VERSION" "$(uname -m)-linux" +RUN scripts/setup-logos-core.sh "$LC_CORE_VERSION" "$(uname -m)-linux" + +# Patch the AppImage magic bytes to restore standard ELF matching for QEMU +RUN dd if=/dev/zero of=lgpd bs=1 count=3 seek=8 conv=notrunc && \ + dd if=/dev/zero of=lgpm bs=1 count=3 seek=8 conv=notrunc && \ + dd if=/dev/zero of=logoscore bs=1 count=3 seek=8 conv=notrunc RUN ./lgpd --appimage-extract && mv squashfs-root ext-lgpd && \ ./lgpm --appimage-extract && mv squashfs-root ext-lgpm && \ ./logoscore --appimage-extract && mv squashfs-root ext-logoscore -RUN ./ext-lgpd/AppRun download blockchain_module --version "$NODE_VERSION" --output ./ && \ - ./ext-lgpm/AppRun --modules-dir ./modules install --file "blockchain_module-${NODE_VERSION}.lgx" +RUN ./ext-lgpd/AppRun download blockchain_module --version "$LB_NODE_VERSION" --output ./ && \ + ./ext-lgpm/AppRun --modules-dir ./modules install --file "blockchain_module-${LB_NODE_VERSION}.lgx" # =========================== # NODE IMAGE