From ad7b1277531827891cb931873acbb08efd145df0 Mon Sep 17 00:00:00 2001 From: Manoj Mahapatra Date: Tue, 24 Feb 2026 15:16:07 -0800 Subject: [PATCH] Add apple container cheat sheet --- sheets/apple-container | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sheets/apple-container diff --git a/sheets/apple-container b/sheets/apple-container new file mode 100644 index 0000000..dee1023 --- /dev/null +++ b/sheets/apple-container @@ -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