Build from source Alpine linux ISO

S
SUVANKAR SARKAR
2 min read13 views
Build from source Alpine linux ISO

Method 1: Use the official Alpine ISO build process

bash

# Clone the correct repository with proper structure
git clone --depth 1 https://gitlab.alpinelinux.org/alpine/alpine-conf.git
cd alpine-conf

# Or use the aports repository but ensure proper setup
git clone --depth 1 https://gitlab.alpinelinux.org/alpine/aports.git
cd aports

# Set up the build environment properly
./scripts/bootstrap.sh

# Make sure you're in the scripts directory and use the correct profile
cd scripts
./mkimage.sh --tag v3.18 \
    --outdir ../iso \
    --arch x86_64 \
    --repository http://dl-cdn.alpinelinux.org/alpine/v3.18/main \
    --extra-repository http://dl-cdn.alpinelinux.org/alpine/v3.18/community \
    alpine-standard

Method 2: Use alpine-make-vm-image (simpler and more reliable)

bash

# Install required tools
apk add alpine-make-vm-image xorriso syslinux

# Create the ISO
alpine-make-vm-image \
    --image-format iso \
    --image-size 1G \
    --packages "alpine-base alpine-conf busybox ca-certificates" \
    my-custom-alpine.iso

Method 3: Use the Docker approach with proper setup

bash

# Use official Alpine build container
docker run -it --rm -v $(pwd):/output alpine:edge sh -c "
apk add --no-cache alpine-sdk build-base git xorriso syslinux &&
git clone https://gitlab.alpinelinux.org/alpine/aports.git /tmp/aports &&
cd /tmp/aports &&
./scripts/bootstrap.sh &&
./scripts/mkimage.sh --tag edge --outdir /output --arch x86_64 --repository http://dl-cdn.alpinelinux.org/alpine/edge/main --extra-repository http://dl-cdn.alpinelinux.org/alpine/edge/community alpine-standard
"

T

Tags

Share:

Comments

Sign in to join the discussion.
Sign in
Sort:
Loading comments...