dev_gitea/dockerbuilder/build_arm.sh

21 lines
472 B
Bash
Raw Normal View History

2024-12-15 17:02:25 +00:00
#!/bin/bash
# Check if --no-cache argument is provided
NO_CACHE=""
if [ "$1" == "--no-cache" ]; then
NO_CACHE="--no-cache"
fi
# Build with:
# 1. Build arguments for better cache control
# 2. Compression and squashing for smaller image size
# 3. Platform specification for better compatibility
docker build \
$NO_CACHE \
--compress \
--force-rm \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--platform linux/arm64 \
-t despiegk/devel:latest \
.