go/docs/run.md
Snider a57fb4273d docs: restructure for VitePress with flat layout and examples
- Remove mkdocs files (requirements.txt, CNAME)
- Add CLI documentation: build.md, release.md, php.md, run.md
- Add configuration.md with full reference
- Add examples/ directory with sample configurations:
  - go-cli-release.yaml
  - wails-desktop-release.yaml
  - php-laravel-release.yaml
  - linuxkit-server.yml
  - linuxkit-docker-format.yml
  - full-release.yaml
  - minimal-release.yaml
  - official-repos.yaml
- Flatten existing framework docs into framework/
- Update index.md as CLI entry point

Ready for VitePress integration with core-php/docs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:38:49 +00:00

1.9 KiB

core run

Run LinuxKit images with qemu or hyperkit.

Usage

core run <image> [flags]

Flags

Flag Description
-d, --detach Run in background
--cpus Number of CPUs (default: 1)
--mem Memory in MB (default: 1024)
--disk Disk size (default: none)
--template Use built-in template

Examples

Run ISO Image

# Run LinuxKit ISO
core run server.iso

# With more resources
core run server.iso --cpus 2 --mem 2048

# Detached mode
core run server.iso -d

Run from Template

# List available templates
core templates

# Run template
core run --template core-dev

Formats

Supported image formats:

  • .iso - Bootable ISO
  • .qcow2 - QEMU disk image
  • .raw - Raw disk image
  • .vmdk - VMware disk

Container Management

# List running containers
core ps

# View logs
core logs <id>

# Follow logs
core logs -f <id>

# Execute command
core exec <id> <command>

# Stop container
core stop <id>

Templates

Built-in templates in .core/linuxkit/:

Template Description
core-dev Development environment
server-php FrankenPHP server

Custom Templates

Create .core/linuxkit/mytemplate.yml:

kernel:
  image: linuxkit/kernel:6.6
  cmdline: "console=tty0"

init:
  - linuxkit/init:latest
  - linuxkit/runc:latest
  - linuxkit/containerd:latest

services:
  - name: myservice
    image: myorg/myservice:latest

files:
  - path: /etc/myconfig
    contents: |
      key: value

Then run:

core run --template mytemplate

Networking

LinuxKit VMs get their own network namespace. Port forwarding:

# Forward port 8080
core run server.iso -p 8080:80

# Multiple ports
core run server.iso -p 8080:80 -p 8443:443

Disk Persistence

# Create persistent disk
core run server.iso --disk 10G

# Attach existing disk
core run server.iso --disk /path/to/disk.qcow2