Skip to content

Latest commit

 

History

History
180 lines (127 loc) · 3.01 KB

File metadata and controls

180 lines (127 loc) · 3.01 KB

Building Spry Packages

This document describes how to build spry packages for various operating systems using DALEC.

Prerequisites

Required Tools

  • Docker (version 20.10 or later)
  • Docker Buildx (usually included with Docker Desktop)
  • Make (optional, for convenience commands)

Verify Prerequisites

# Check Docker version
docker --version

# Check Buildx is available
docker buildx version

# Ensure BuildKit is enabled
export DOCKER_BUILDKIT=1

Quick Start

Build All Packages

make build-all

This will build spry packages for:

  • Ubuntu 22.04 (Jammy) - DEB
  • Debian 12 (Bookworm) - DEB
  • Windows - ZIP (cross-compiled)

Build Specific Platform

# Ubuntu Jammy
make build-jammy

# Debian Bookworm
make build-bookworm

# Windows
make build-windows

Manual Build Commands

If you prefer not to use Make, you can run Docker commands directly:

DEB Packages

# Ubuntu Jammy
docker buildx build \
  --target jammy \
  --output type=local,dest=./output/jammy \
  -f dalec-spry.yaml \
  .

# Debian Bookworm
docker buildx build \
  --target bookworm \
  --output type=local,dest=./output/bookworm \
  -f dalec-spry.yaml \
  .

Windows Package

docker buildx build \
  --target windowscross \
  --output type=local,dest=./output/windows \
  -f dalec-spry.yaml \
  .

Using Docker Compose

You can also use Docker Compose to build packages:

# Build for specific platform
docker-compose run build-jammy
docker-compose run build-bookworm
docker-compose run build-windows

Local Compilation with Deno

For development and testing, you can compile directly with Deno:

# Install Deno (if not already installed)
curl -fsSL https://deno.land/install.sh | sh

# Compile spry
make compile-local

# Or manually:
deno compile \
  --allow-all \
  --import-map=import_map.json \
  --output=spry \
  spry.ts

Output Location

Built packages will be in the output/ directory:

output/
├── jammy/
│   └── spry_0.1.0-1_amd64.deb
├── bookworm/
│   └── spry_0.1.0-1_amd64.deb
└── windows/
    └── spry-windows.zip

Troubleshooting

BuildKit Not Enabled

If you see errors about BuildKit, ensure it's enabled:

export DOCKER_BUILDKIT=1

Or add to your Docker daemon configuration (/etc/docker/daemon.json):

{
  "features": {
    "buildkit": true
  }
}

Permission Denied

If you encounter permission issues with Docker:

# Add your user to the docker group
sudo usermod -aG docker $USER

# Log out and back in for changes to take effect

Clean Build

To start fresh:

make clean

CI/CD

The GitHub Actions workflow (.github/workflows/build.yml) automatically builds packages for all platforms on:

  • Push to main branch
  • New tags (v*)
  • Pull requests

More Information