The release workflow publishes the image itself; nothing needs building
locally. A v* tag builds the static (musl) Linux binaries for x86_64, arm64
and armv7 (build_linux in .github/workflows/ci.yml, published as
vuio-linux-x86_64.tar.gz, vuio-linux-arm64.tar.gz and
vuio-linux-armv7.tar.gz), and docker_image copies the first two into the
image (FROM scratch) instead of
compiling, starts each platform with host networking, checks that it drops root,
serves HTTP and answers an SSDP search, and pushes ghcr.io/vuiodev/vuio with
the version in both spellings and as latest (for v1.2.3: 1.2.3, v1.2.3,
1.2, latest). The Helm chart is published after it.
Every pull request runs the same two jobs without pushing. To publish the image
again for an existing tag, run the workflow manually with the docker task and
that tag, from that tag.
--build-arg VUIO_BINARY=prebuilt makes the Dockerfile copy
docker-bin/vuio-amd64 and docker-bin/vuio-arm64 from the build context and
skip the Rust stages entirely, so the build takes seconds:
TAG=v1.2.3
mkdir -p docker-bin
curl -sSL "https://github.com/vuiodev/vuio/releases/download/$TAG/vuio-linux-x86_64.tar.gz" | tar -xzO vuio > docker-bin/vuio-amd64
curl -sSL "https://github.com/vuiodev/vuio/releases/download/$TAG/vuio-linux-arm64.tar.gz" | tar -xzO vuio > docker-bin/vuio-arm64
chmod +x docker-bin/*
docker buildx build --platform linux/amd64,linux/arm64 --build-arg VUIO_BINARY=prebuilt -t vuio:local .
# or, with Apple's container CLI:
container build --arch amd64 --arch arm64 --build-arg VUIO_BINARY=prebuilt -t vuio:local .The binaries must be static, as the Linux release binaries are: the image is
FROM scratch, with no libc at all for anything else to load.
Without VUIO_BINARY, the Dockerfile compiles the server inside the build, as
docker build . from a checkout expects. It is slow, but it is the way to a
trimmed image (see VUIO_CARGO_FLAGS in the Dockerfile).
The project includes a script for building from source and publishing multi-architecture Docker images to GitHub Container Registry.
scripts/build-and-push-docker.sh
./scripts/build-and-push-docker.sh --tag v0.0.22 --platforms linux/amd64,linux/arm64
- Multi-architecture support: Builds for
linux/amd64andlinux/arm64by default - Automatic tagging: Creates semantic version tags (e.g.,
v1.2.3,1.2.3,1.2,1,latest) - GitHub Container Registry: Publishes to
ghcr.iowith auto-detection of your GitHub username - Build optimizations: Supports cache control and custom platforms
- User-friendly: Color-coded output, progress messages, and comprehensive error handling
The Docker build uses rust:1-alpine as the base image, which limits the supported platforms:
- ✅
linux/amd64- Supported - ✅
linux/arm64- Supported
Before running the script, you need to:
- Log in to GitHub Container Registry:
echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_USERNAME --password-stdin- Ensure Docker Buildx is available (usually comes with Docker Desktop or Docker 19.03+)
# Basic usage - build and push a version
./scripts/build-and-push-docker.sh --tag v1.0.0
# Build for single platform only (faster for testing)
./scripts/build-and-push-docker.sh --tag v1.2.3 --platforms linux/amd64
# Build without cache
./scripts/build-and-push-docker.sh --tag v2.0.0 --no-cache
# Skip 'latest' tag
./scripts/build-and-push-docker.sh --tag v1.0.0-beta --no-latest
# Custom GitHub user/org
./scripts/build-and-push-docker.sh --tag v1.0.0 --user myorganization
# View help
./scripts/build-and-push-docker.sh --help| Option | Description | Default |
|---|---|---|
-t, --tag TAG |
Version tag (e.g., v1.0.0) | Required |
-u, --user USER |
GitHub username/organization | Auto-detected from git |
-r, --registry URL |
Container registry URL | ghcr.io |
-p, --platforms ARCH |
Platforms to build | linux/amd64,linux/arm64 |
--no-cache |
Build without cache | Uses cache |
--no-latest |
Don't tag as 'latest' | Tags as latest |
-h, --help |
Show help message | - |
- Auto-detects GitHub username from git remote origin
- Validates required arguments and checks for Docker/buildx
- Creates or reuses a buildx builder instance for multi-arch builds
- Builds the Docker image for specified platforms using the Alpine-based Dockerfile
- Tags the image with semantic versioning (major, minor, patch, latest)
- Pushes all tags to GitHub Container Registry
==========================================
Docker Multi-Arch Build & Push
==========================================
Project: vuio
Tag: v1.0.0
Version: 1.0.0
Registry: ghcr.io
User: yourusername
Image: ghcr.io/yourusername/vuio
Platforms: linux/amd64,linux/arm64
Tag latest: true
==========================================
After successful publication, you can pull images with:
# Specific version
docker pull ghcr.io/yourusername/vuio:1.0.0
# Latest version
docker pull ghcr.io/yourusername/vuio:latest
# Major version
docker pull ghcr.io/yourusername/vuio:1Authentication errors: Ensure you're logged in to ghcr.io with a valid GitHub token that has write:packages permission
Buildx not found: Update Docker to version 19.03+ or install buildx plugin
Platform not supported: Check that QEMU is set up for cross-platform builds:
docker run --privileged --rm tonistiigi/binfmt --install all