21 lines
472 B
Bash
Executable File
21 lines
472 B
Bash
Executable File
#!/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 \
|
|
.
|