'Generic Commit'
Some checks failed
dropshell-build / build (push) Has been cancelled

This commit is contained in:
Your Name
2025-06-14 22:07:46 +12:00
parent e4d0661d50
commit 1ac00e83f8
12 changed files with 164 additions and 144 deletions

View File

@ -200,7 +200,6 @@ RUN curl -LO https://github.com/gabime/spdlog/archive/refs/tags/v${SPDLOG_VERSIO
#ARG DROGON_VERSION=1.9.5
WORKDIR /tmp
RUN git clone --recurse-submodules https://github.com/drogonframework/drogon.git /tmp/drogon && \
#RUN git clone --branch v${DROGON_VERSION} --depth 1 https://github.com/drogonframework/drogon.git /tmp/drogon && \
mkdir -p /tmp/drogon/build && \
cd /tmp/drogon/build && \
cmake .. \

View File

@ -5,22 +5,14 @@ set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Create buildx builder if it doesn't exist
docker buildx create --name multiarch --use 2>/dev/null || docker buildx use multiarch
docker buildx create --name multiarch --use \
--driver-opt env.BUILDKIT_MAX_PARALLELISM=4 \
2>/dev/null || docker buildx use multiarch
# Detect if we're building for testing or publishing
if [ "${BUILD_MODE:-test}" = "multiarch" ]; then
# Build multi-platform image (for publishing)
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t "gitea.jde.nz/public/dropshell-build-base:latest" \
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build-base" \
${SCRIPT_DIR}
else
# Build single-platform image for current architecture and load it
docker buildx build \
--load \
-t "gitea.jde.nz/public/dropshell-build-base:latest" \
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build-base" \
${SCRIPT_DIR}
fi
# Build multi-platform image and push it
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
-t "gitea.jde.nz/public/dropshell-build-base:test" \
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build-base" \
${SCRIPT_DIR}

23
build-base/publish.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
# check standard variables present.
[[ -n $SOS_WRITE_TOKEN ]] || die "SOS_WRITE_TOKEN not specified"
[[ -n $DOCKER_PUSH_TOKEN ]] || die "DOCKER_PUSH_TOKEN not specified"
echo "Publishing dropshell-build-base:test as :latest..."
# Pull the multiarch manifest from :test tag
docker buildx imagetools create \
--tag gitea.jde.nz/public/dropshell-build-base:latest \
gitea.jde.nz/public/dropshell-build-base:test
echo "Successfully tagged dropshell-build-base:test as :latest"
# Show the manifest to confirm it's multiarch
echo ""
echo "Verifying multiarch manifest:"
docker buildx imagetools inspect gitea.jde.nz/public/dropshell-build-base:latest