Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions sheets/apple-container
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Apple Container CLI (macOS)
# https://github.com/apple/container

# Run container interactively
container run -it ubuntu:latest /bin/bash

# Run detached with port mapping
container run -d --name web -p 8080:80 nginx:latest

# Run with env vars and resource limits
container run -e NODE_ENV=prod --cpus 2 --memory 1G node:18

# Build image
container build -t myapp:latest .

# Container lifecycle
container create --name myc ubuntu:latest
container start myc
container stop myc
container kill myc
container delete myc
container delete --all

# List and inspect
container list --all
container logs -f myc
container exec -it myc /bin/bash
container inspect myc
container stats

# Image management
container image list
container image pull ubuntu:latest
container image push myregistry.com/img:latest
container image save -o backup.tar img:latest
container image load -i backup.tar
container image tag img:latest img:v1.0
container image delete img:latest
container image prune --all

# Builder (BuildKit)
container builder start
container builder status
container builder stop

# Network (macOS 26+)
container network create mynet
container network list
container network delete mynet

# Volume
container volume create myvol
container volume list
container volume delete myvol

# Registry
container registry login docker.io
container registry logout docker.io

# System
container system start
container system stop
container system status
container system version
container system logs -f
container system df
sudo container system dns create myapp.local
container system property list
container system property set build.rosetta true