1
1

Copy build to local directory

This commit is contained in:
2026-04-17 20:18:52 +02:00
parent e52a414cb9
commit faf08d29bb
+17 -5
View File
@@ -3,12 +3,24 @@
set -e
IMAGE_NAME="zyxel-openwrt-builder"
CONTAINER_NAME="openwrt-builder-container"
FIRMWARE_PATH="/home/builder/openwrt/bin/brcm963xx/zyxel/ras.bin"
echo "Building Docker image ${IMAGE_NAME}..."
docker build -t ${IMAGE_NAME} .
docker run -it --rm -e TERM=vt100 ${IMAGE_NAME}
docker run -it --name openwrt-builder-container openwrt-builder
docker cp openwrt-builder-container:/home/builder/openwrt/bin/brcm963xx/zyxel/ras.bin ./ras.bin
#docker rm openwrt-builder-container
echo "Starting container..."
docker run -it --name ${CONTAINER_NAME} \
-e TERM=vt100 \
${IMAGE_NAME} \
/bin/bash -c "cd /home/builder/openwrt && bash"
#TODO: copy config file to home
docker cp ${CONTAINER_NAME}:${FIRMWARE_PATH} ./ras.bin 2>/dev/null || {
echo "ERROR: Firmware not found at ${FIRMWARE_PATH}"
echo "The build may have failed or the output path is not ${FIRMWARE_PATH}"
echo "You can inspect the container manually: docker start -ai ${CONTAINER_NAME}"
exit 1
}
echo "Firmware copied to ./ras.bin"