================ CODE SNIPPETS ================ TITLE: Run a Docker Getting Started Container DESCRIPTION: Demonstrates how to run a basic Docker container using the 'docker/getting-started' image and exposes port 80. This is a common way to test Docker functionality. SOURCE: https://docs.orbstack.dev/quick-start LANGUAGE: bash CODE: ``` docker run -p 80:80 docker/getting-started ``` -------------------------------- TITLE: Install OrbStack with Homebrew DESCRIPTION: Installs OrbStack using the Homebrew package manager. This is an alternative installation method for users who prefer using Homebrew. SOURCE: https://docs.orbstack.dev/quick-start LANGUAGE: bash CODE: ``` brew install orbstack ``` -------------------------------- TITLE: Cloud-init Configuration Example (YAML) DESCRIPTION: This is an example of a Cloud-init user data file written in YAML cloud-config format. It shows directives for creating a group, installing a package, and writing a file to the machine's filesystem during provisioning. SOURCE: https://docs.orbstack.dev/machines/cloud-init LANGUAGE: yaml CODE: ``` #cloud-config # create group 'admingroup' with member 'root', and empty group 'cloud-users' groups: - admingroup: [root] - cloud-users # install package 'git' packages: - git # write file '/etc/cltest' with content 'it works!' write_files: - content: | it works! path: /etc/cltest ``` -------------------------------- TITLE: Create Linux Machine and Run Podman Container with OrbStack DESCRIPTION: This example demonstrates how to create a Linux machine using OrbStack, install Podman within it, and then run a basic container using Podman. This is a workaround for using Podman before native support is available. SOURCE: https://docs.orbstack.dev/faq LANGUAGE: bash CODE: ``` orb create ubuntu orb sudo apt install podman orb sudo podman run -it --rm -p 80:80 docker.io/docker/getting-started ``` -------------------------------- TITLE: Command-line Tool Setup without UI DESCRIPTION: OrbStack supports setting up its command-line tools without requiring the graphical user interface, enabling automated or headless installations. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` Added support for command-line tool setup without UI ``` -------------------------------- TITLE: Onboarding Redesign DESCRIPTION: Redesigns the onboarding process for new users, making it easier and more informative to get started with OrbStack. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Redesigned onboarding for new users ``` -------------------------------- TITLE: Start Nginx Service in Linux DESCRIPTION: This snippet demonstrates how to install and start the Nginx web server within an OrbStack Linux machine using apt and systemctl. It assumes a Debian-based distribution like Ubuntu. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` apt install nginx systemctl start nginx ``` -------------------------------- TITLE: Start Containers and Projects DESCRIPTION: Enables starting containers and projects directly from the menu bar, offering quick access to manage running applications. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Start containers & projects from the menu bar ``` -------------------------------- TITLE: Install Kubernetes Benchmarks with Helm DESCRIPTION: This bash script demonstrates the installation of Traefik and Grafana using Helm for Kubernetes benchmarking. It adds the respective Helm repositories, updates them, and then installs Traefik and Grafana. SOURCE: https://docs.orbstack.dev/benchmarks LANGUAGE: bash CODE: ``` helm repo add traefik https://traefik.github.io/charts helm repo add grafana https://grafana.github.io/helm-charts helm repo update helm install traefik traefik/traefik helm install grafana grafana/grafana ``` -------------------------------- TITLE: Automate Machine Setup with OrbStack CLI DESCRIPTION: This snippet shows how to create a new Linux machine (e.g., Ubuntu) using the OrbStack CLI and then execute a setup script (setup.sh) on the newly created machine. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` orb create ubuntu new-ubuntu && orb -m new-ubuntu ./setup.sh ``` -------------------------------- TITLE: Install Istio with custom CNI paths DESCRIPTION: This snippet provides the necessary flags for the `istioctl install` or `helm install` commands to correctly integrate Istio with OrbStack's Kubernetes cluster, specifically pointing to the CNI binary and configuration directories. SOURCE: https://docs.orbstack.dev/kubernetes LANGUAGE: bash CODE: ``` --set values.cni.cniBinDir=/var/lib/rancher/k3s/data/current/bin/ --set values.cni.cniConfDir=/var/lib/rancher/k3s/agent/etc/cni/net.d ``` -------------------------------- TITLE: Get OrbStack Help DESCRIPTION: Displays the help information for the OrbStack command-line interface, providing an overview of available commands and their usage. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` orb help ``` -------------------------------- TITLE: Install Command-Line Tools with OrbStack DESCRIPTION: This section details the command-line tools installed by OrbStack when admin access is granted. These tools include OrbStack's own management utilities, Docker CLI tools, and a Docker credential helper for macOS keychain integration. SOURCE: https://docs.orbstack.dev/faq LANGUAGE: Shell CODE: ``` orbctl: Manage OrbStack and use Linux machines docker, docker-compose, docker-buildx: Docker command-line tools docker-credential-osxkeychain: Provider for saving registry logins in the macOS keychain ``` -------------------------------- TITLE: Install Traefik with Helm DESCRIPTION: This snippet demonstrates how to install Traefik as an Ingress controller using Helm. It includes adding the Traefik Helm repository, updating it, and then installing Traefik using its chart. SOURCE: https://docs.orbstack.dev/kubernetes LANGUAGE: bash CODE: ``` # Install Helm first: https://helm.sh/docs/intro/install/ helm repo add traefik https://traefik.github.io/charts helm repo update helm install traefik traefik/traefik ``` -------------------------------- TITLE: Install OrbStack with Homebrew DESCRIPTION: Installs OrbStack using the Homebrew package manager. This is the recommended method for command-line installation. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` brew install orbstack ``` -------------------------------- TITLE: Run a Docker Container DESCRIPTION: Example of running a Docker container using the standard Docker command after OrbStack has been started. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` docker run -p 80:80 docker/getting-started ``` -------------------------------- TITLE: Automatic Package Installation Prompt DESCRIPTION: Demonstrates the automatic package installation prompt within the Debug Shell when a command is not found. The user is prompted to install the required package. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` ❯ emacs emacs: command not found * install package 'emacs'? [y/N] ``` -------------------------------- TITLE: Debug x86 Programs with QEMU and GDB DESCRIPTION: This example shows how to debug x86 programs running under QEMU on an ARM machine. It involves installing QEMU, running the x86 program with a debug server enabled, and then connecting to that server using GDB from another terminal. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` sudo apt install qemu-user-static qemu-x86_64-static -g 1234 ./hello # in another terminal gdb ./hello target remote :1234 continue ``` -------------------------------- TITLE: Install Ingress-NGINX with kubectl DESCRIPTION: This snippet shows how to install the Ingress-NGINX controller using kubectl by applying a YAML configuration file from a GitHub URL. This is necessary for using LoadBalancer services with virtual hosts. SOURCE: https://docs.orbstack.dev/kubernetes LANGUAGE: bash CODE: ``` kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.1/deploy/static/provider/cloud/deploy.yaml ``` -------------------------------- TITLE: Start and Stop OrbStack DESCRIPTION: Commands to start and stop the OrbStack service. Once started, Docker commands can be used as usual. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` orb orb start ``` LANGUAGE: bash CODE: ``` orb stop ``` -------------------------------- TITLE: Migrate Docker Data via CLI DESCRIPTION: This command initiates the migration of your existing Docker data, including containers and volumes, to OrbStack. It's an optional step performed after installation. SOURCE: https://docs.orbstack.dev/install LANGUAGE: bash CODE: ``` orb docker migrate ``` -------------------------------- TITLE: Switch Docker Context to Docker Desktop DESCRIPTION: This command allows you to switch your Docker context back to Docker Desktop. This is necessary if you are reverting from OrbStack or want to use Docker Desktop alongside OrbStack. SOURCE: https://docs.orbstack.dev/install LANGUAGE: bash CODE: ``` docker context use desktop-linux ``` -------------------------------- TITLE: Switch Docker Context to OrbStack DESCRIPTION: This command allows you to switch your Docker context to use OrbStack. This is useful for running OrbStack and Docker Desktop or Colima side-by-side. SOURCE: https://docs.orbstack.dev/install LANGUAGE: bash CODE: ``` docker context use orbstack ``` -------------------------------- TITLE: Create OrbStack Linux Machines DESCRIPTION: This example demonstrates creating new Linux machines using the OrbStack CLI. It covers creating a default Ubuntu machine, a specific Ubuntu version (jammy), and an Intel (x86_64/amd64) machine on Apple Silicon. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` orb create ubuntu new-ubuntu # An older version orb create ubuntu:jammy new-ubuntu # Intel machine on Apple Silicon orb create --arch amd64 ubuntu new-ubuntu ``` -------------------------------- TITLE: Start Linux Shell with Specific Machine and User in OrbStack DESCRIPTION: Starts an interactive shell in a specified Linux machine and user within OrbStack. This allows for targeted management of different environments. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` orb -m my-machine -u my-user ``` -------------------------------- TITLE: Run Mac Commands from Linux DESCRIPTION: This example shows how to execute Mac-specific commands like 'open' and 'pbcopy' from within a Linux machine managed by OrbStack. It also demonstrates using the 'mac' prefix for direct execution of Mac commands. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` # open foo.txt in the default Mac text editor open foo.txt # copy `ps` output to Mac clipboard ps | pbcopy ``` LANGUAGE: bash CODE: ``` mac uname -a ``` -------------------------------- TITLE: Expose Nginx deployment using NodePort DESCRIPTION: This example shows how to create a Kubernetes deployment with the Nginx image, expose it using a NodePort service, and then retrieve the service details to find the NodePort mapping. It also demonstrates accessing the service via localhost. SOURCE: https://docs.orbstack.dev/kubernetes LANGUAGE: bash CODE: ``` $ kubectl create deployment nginx --image nginx $ kubectl expose deploy/nginx --type=NodePort --port=80 $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) nginx NodePort 192.168.194.217 80:32042/TCP $ curl -I localhost:32042 HTTP/1.1 200 OK Server: nginx/1.25.2 ``` -------------------------------- TITLE: Start Debug Shell from Command Line DESCRIPTION: Initiates a Debug Shell session for a specified container directly from the command line interface. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` orb debug ``` -------------------------------- TITLE: Install Package in Debug Shell DESCRIPTION: Installs a specified package within the OrbStack Debug Shell environment using the `dctl` command. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` dctl install nvim ``` -------------------------------- TITLE: Start Default Linux Shell with OrbStack DESCRIPTION: Opens an interactive shell within the default Linux machine managed by OrbStack. This is the primary way to interact with the Linux environment. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` orb ``` -------------------------------- TITLE: Switch Docker Context to Colima DESCRIPTION: This command allows you to switch your Docker context to use Colima. This is useful for running OrbStack and Colima side-by-side. SOURCE: https://docs.orbstack.dev/install LANGUAGE: bash CODE: ``` docker context use colima ``` -------------------------------- TITLE: OrbStack Cloud-init for Linux Machines DESCRIPTION: Introduces cloud-init support for Linux machines in OrbStack, enabling users to replicate and test environments using user data, similar to EC2 instances. This facilitates easier environment setup and configuration. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: cloud-config CODE: ``` #cloud-config users: - name: orbstack_user sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash packages: - nginx runcmd: - echo "Hello from OrbStack cloud-init!" > /var/log/orbstack_init.log ``` -------------------------------- TITLE: VM Start Error Fix DESCRIPTION: Fixes occasional "Failed to start VM" errors encountered in the UI, ensuring reliable virtual machine operation. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Fixed occasional "Failed to start VM" errors in UI ``` -------------------------------- TITLE: Docker CLI Tool Replacement DESCRIPTION: During OrbStack setup, Docker Desktop CLI tools are replaced to ensure compatibility and proper integration. This is a breaking change for users transitioning from Docker Desktop. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` Docker Desktop CLI tools will now be replaced during setup ``` -------------------------------- TITLE: Create Linux Machine with Specific Distro Version DESCRIPTION: Demonstrates how to create a new OrbStack Linux machine with a specific distribution and version using the 'orb create' command. This example shows creating an Ubuntu machine with the Jammy codename. SOURCE: https://docs.orbstack.dev/machines/distros LANGUAGE: bash CODE: ``` orb create ubuntu:jammy ``` LANGUAGE: bash CODE: ``` orb create alma:8 ``` LANGUAGE: bash CODE: ``` orb create alpine:edge ``` LANGUAGE: bash CODE: ``` orb create debian:bookworm ``` LANGUAGE: bash CODE: ``` orb create devuan:beowulf ``` LANGUAGE: bash CODE: ``` orb create fedora:36 ``` LANGUAGE: bash CODE: ``` orb create opensuse:tumbleweed ``` -------------------------------- TITLE: OrbStack Domain Configuration for Compose Projects DESCRIPTION: Explains that `.orb.local` domains now function across different Compose projects within OrbStack. This enhances service discovery and inter-project communication in complex development setups. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: yaml CODE: ``` # docker-compose.yml for Project A services: web_a: image: nginx ports: - "8080:80" # docker-compose.yml for Project B services: web_b: image: httpd ports: - "8081:80" # Access Project A service via: project-a-web-a.orb.local:8080 # Access Project B service via: project-b-web-b.orb.local:8081 ``` -------------------------------- TITLE: Create Docker Context for Remote Host DESCRIPTION: Establishes a Docker CLI context to connect to a remote Docker host, enabling remote debugging capabilities. This example uses SSH for authentication. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` docker context create servy --docker host=ssh://user@192.168.1.100 ``` -------------------------------- TITLE: Enable Multi-Arch Support on Ubuntu DESCRIPTION: This snippet demonstrates how to enable multi-architecture support on Ubuntu to run x86 programs alongside ARM programs. It involves adding the amd64 architecture, updating the package list with specific repositories for both architectures, and installing the necessary C library for amd64. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` sudo dpkg --add-architecture amd64 # Fix repos echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports lunar main restricted universe multiverse deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports lunar-updates main restricted universe multiverse deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports lunar-security main restricted universe multiverse deb [arch=amd64] http://archive.ubuntu.com/ubuntu lunar main restricted universe multiverse deb [arch=amd64] http://archive.ubuntu.com/ubuntu lunar-updates main restricted universe multiverse deb [arch=amd64] http://archive.ubuntu.com/ubuntu lunar-security main restricted universe multiverse' | sudo tee /etc/apt/sources.list # Install libraries sudo apt update sudo apt install libc6:amd64 ``` -------------------------------- TITLE: Reset Installed Packages/Data in Debug Shell DESCRIPTION: Introduces a command within the Debug Shell to reset installed packages and data, providing a quick way to revert a container's state to a clean or default configuration. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Debug Shell: Command to reset installed packages/data ``` -------------------------------- TITLE: Debug Container on Remote Host DESCRIPTION: Starts a Debug Shell session for a container on a remote Docker host, utilizing a specified Docker context. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` orb debug -c servy ``` -------------------------------- TITLE: Accessing Pods directly by IP DESCRIPTION: This example demonstrates how to retrieve the IP address of a running Kubernetes pod and then access it directly using curl. This is useful for debugging or testing individual pods. SOURCE: https://docs.orbstack.dev/kubernetes LANGUAGE: bash CODE: ``` $ kubectl get pods -o wide NAME READY STATUS RESTARTS IP nginx-77b4fdf86c-fdmdn 1/1 Running 0 192.168.194.20 $ curl -I 192.168.194.20 HTTP/1.1 200 OK Server: nginx/1.25.2 ... ``` -------------------------------- TITLE: Auto HTTPS for Machines DESCRIPTION: Enables automatic HTTPS provisioning for machines managed by OrbStack, simplifying the setup of secure network access for these machines. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Domains: Auto HTTPS for machines ``` -------------------------------- TITLE: OrbStack v1.6.4: AI-Powered Package Suggestions DESCRIPTION: Version 1.6.4 enhances the Debug Shell with AI-powered package install suggestions for commands. This aims to improve user experience by assisting with command execution and package management. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Debug Shell: AI-powered package install suggestions for commands ``` -------------------------------- TITLE: Run HTTP Server in Linux Machine DESCRIPTION: Starts a simple HTTP server on port 8000 within a Linux machine. This server is accessible from macOS on localhost:8000 and potentially other network devices if it listens on 0.0.0.0 or ::. SOURCE: https://docs.orbstack.dev/machines/network LANGUAGE: bash CODE: ``` python3 -m http.server 8000 ``` -------------------------------- TITLE: Mount Mac Downloads Folder in Container DESCRIPTION: This example demonstrates how to bind mount your macOS Downloads folder into a container, allowing the container to access files within that directory. It uses the standard Docker `-v` flag for mounting. SOURCE: https://docs.orbstack.dev/docker/file-sharing LANGUAGE: bash CODE: ``` docker run -v $HOME/Downloads:/downloads alpine ls /downloads ``` -------------------------------- TITLE: Add Custom Domains to Container (Compose) DESCRIPTION: This example shows how to configure custom domain names for a service within a Docker Compose project using the `dev.orbstack.domains` label in the `docker-compose.yml` file. SOURCE: https://docs.orbstack.dev/docker/domains LANGUAGE: yaml CODE: ``` services: nginx: image: nginx labels: - dev.orbstack.domains=foo.local,bar.local ``` -------------------------------- TITLE: Connect to Linux Machine from Mac DESCRIPTION: Shows how to access a service running on a Linux machine from macOS using its IP address. This example uses `curl` to connect to a service on `198.19.249.204`. SOURCE: https://docs.orbstack.dev/machines/network LANGUAGE: bash CODE: ``` curl 198.19.249.204 ``` -------------------------------- TITLE: Setting OrbStack Network Proxy DESCRIPTION: Demonstrates how to configure OrbStack's network proxy settings using the `orb config set network_proxy` command. Examples include setting HTTP, HTTPS, and SOCKS proxies, and resetting to use the system's automatic proxy settings. SOURCE: https://docs.orbstack.dev/docker/network LANGUAGE: bash CODE: ``` # HTTP orb config set network_proxy http://example.com # HTTPS with password on port 8443 orb config set network_proxy https://user:password@example.com:8443 # SOCKS with password on port 1081 orb config set network_proxy socks5://user:password@example.com:1081 # reset to system proxy orb config set network_proxy auto ``` -------------------------------- TITLE: Ansible Inventory for OrbStack Machines DESCRIPTION: Provides examples of how to configure Ansible inventory files to connect to OrbStack Linux machines. It shows how to specify the machine name and user for Ansible connections. SOURCE: https://docs.orbstack.dev/machines/ssh LANGUAGE: ini CODE: ``` [servers] ubuntu@orb ansible_user=ubuntu ``` LANGUAGE: ini CODE: ``` [servers] root@ubuntu@orb ansible_user=root@ubuntu ``` -------------------------------- TITLE: Attach a Docker Volume to a Container DESCRIPTION: This example illustrates how to attach a previously created volume (named 'foo') to a container. The volume is mounted at the '/data' directory within the container, using the standard Docker `-v` flag with the volume name as the source. SOURCE: https://docs.orbstack.dev/docker/file-sharing LANGUAGE: bash CODE: ``` docker run -v foo:/data alpine ls /data ``` -------------------------------- TITLE: Startup Speed DESCRIPTION: No description SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: Direct Container Access via IP DESCRIPTION: Provides an example of accessing a container directly using its IP address from the host machine. This method is an alternative to port forwarding, especially when the specific ports are unknown or to avoid port conflicts. SOURCE: https://docs.orbstack.dev/docker/network LANGUAGE: bash CODE: ``` curl 192.168.215.2 ``` -------------------------------- TITLE: Get Linux Machine IP Address DESCRIPTION: A command to display network interface details within a Linux machine, including its IPv4 and IPv6 addresses. This is useful for establishing direct connections between machines. SOURCE: https://docs.orbstack.dev/machines/network LANGUAGE: shell CODE: ``` ip addr ``` -------------------------------- TITLE: Configure Docker Engine Network Access DESCRIPTION: This snippet shows how to configure the OrbStack Docker engine to be accessible over the network. It involves modifying the `daemon.json` file to include host configurations for TCP and Unix sockets, and disabling TLS for simplicity in this example. Be aware of the significant security risks associated with exposing the engine without TLS. SOURCE: https://docs.orbstack.dev/docker LANGUAGE: json CODE: ``` { "hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"], "tls": false } ``` -------------------------------- TITLE: SSH Agent Forwarding in Docker Containers with OrbStack DESCRIPTION: Shows how to forward your SSH agent from macOS to a Docker container using OrbStack. This allows containers to use your local SSH keys, for example, to access Git repositories. It utilizes a volume mount for the SSH agent socket and sets the `SSH_AUTH_SOCK` environment variable within the container. SOURCE: https://docs.orbstack.dev/docker LANGUAGE: bash CODE: ``` docker run -it --rm \ -v /run/host-services/ssh-auth.sock:/agent.sock \ -e SSH_AUTH_SOCK=/agent.sock \ alpine ``` -------------------------------- TITLE: Create Linux Machine with Cloud-init User Data DESCRIPTION: This command demonstrates how to create a new Linux machine using OrbStack and provide Cloud-init user data from a specified file. The `-c` or `--user-data` flag is used to pass the path to the user data configuration file. SOURCE: https://docs.orbstack.dev/machines/cloud-init LANGUAGE: bash CODE: ``` orb create ubuntu my-machine -c user-data.yml ``` -------------------------------- TITLE: Create New Linux Machine with OrbStack DESCRIPTION: Creates a new Linux machine, specifying the distribution and a name for the machine. This command is fundamental for setting up new environments. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` orb create ubuntu my-machine ``` -------------------------------- TITLE: Docker Configuration GUI DESCRIPTION: Introduces a new graphical user interface for configuring Docker settings, simplifying management. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` New Docker config GUI ``` -------------------------------- TITLE: Run and Build x86/ARM64 Containers with OrbStack DESCRIPTION: Demonstrates how to run and build Docker containers for both Intel (x86_64/amd64) and ARM64 architectures using the `--platform` flag in OrbStack. This is particularly useful on Apple Silicon Macs for cross-architecture compatibility. SOURCE: https://docs.orbstack.dev/docker LANGUAGE: bash CODE: ``` # Run an x86 container docker run -it --rm --platform linux/amd64 alpine # Run an arm64 container docker run -it --rm --platform linux/arm64 alpine # Build for x86 docker build --platform linux/amd64 . # Build for arm64 docker build --platform linux/arm64 . ``` -------------------------------- TITLE: Run Open edX Dev Provisioning Benchmark DESCRIPTION: This bash script executes the 'make pull' command to exclude image pull time from network noise, followed by 'time make dev.provision' to measure the time taken for Open edX development environment provisioning. It's used for benchmarking heavy builds. SOURCE: https://docs.orbstack.dev/benchmarks LANGUAGE: bash CODE: ``` # Exclude image pull time to reduce network noise make pull time make dev.provision ``` -------------------------------- TITLE: Support for Full x86 Docker Engine with Rosetta DESCRIPTION: Enables running the full x86 Docker engine using Rosetta, allowing for faster execution of x86 containers and resolving common Rosetta-related bugs. SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: OrbStack CLI Configuration DESCRIPTION: Manage OrbStack settings using the command-line interface. This allows for granular control over various aspects of the Docker and Linux environments. SOURCE: https://docs.orbstack.dev/settings LANGUAGE: bash CODE: ``` orb config ``` LANGUAGE: bash CODE: ``` orb delete docker ``` LANGUAGE: bash CODE: ``` orb reset ``` -------------------------------- TITLE: Manage OrbStack Configuration DESCRIPTION: Demonstrates how to change OrbStack settings, such as disabling admin permission prompts. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` orb config set setup.use_admin false ``` -------------------------------- TITLE: Linux Machine Distro Picker DESCRIPTION: Introduces a user interface for selecting the distribution version for Linux machines, offering more control over the environment. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Distro version picker UI for Linux machines ``` -------------------------------- TITLE: Switch Docker Context to Docker Desktop DESCRIPTION: This command allows you to switch your Docker context back to Docker Desktop after using OrbStack. Ensure OrbStack is stopped before executing this command. SOURCE: https://docs.orbstack.dev/faq LANGUAGE: bash CODE: ``` docker context use desktop-linux ``` -------------------------------- TITLE: Binfmt Support DESCRIPTION: Adds binfmt support, enabling the direct execution of macOS executables from within Linux environments managed by OrbStack. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` binfmt support for running macOS executables directly from Linux ``` -------------------------------- TITLE: Build Multi-Platform Docker Images with Buildx DESCRIPTION: This snippet demonstrates how to create and use a BuildKit builder for parallel multi-platform Docker image builds. It includes commands to set up a custom builder and then build images for specified platforms. SOURCE: https://docs.orbstack.dev/docker/images LANGUAGE: bash CODE: ``` # Create a parallel multi-platform builder docker buildx create --name mybuilder --use # Make "buildx" the default docker buildx install # Build for multiple platforms docker build --platform linux/amd64,linux/arm64 . ``` -------------------------------- TITLE: Compatibility with Docker Desktop Domains DESCRIPTION: OrbStack now includes `host.docker.internal` and other domains for compatibility with Docker Desktop, ensuring consistent network resolution. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` Added `host.docker.internal` and other domains for compatibility with Docker Desktop ``` -------------------------------- TITLE: Create a Linux Machine DESCRIPTION: Command to create a new Linux machine, such as an Ubuntu instance for CI runners, using OrbStack. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` orb create ubuntu ci-runner ``` -------------------------------- TITLE: OrbStack Services Languages DESCRIPTION: OrbStack's core services are built from scratch using a combination of Swift, Go, Rust, and C to ensure tailored performance and integration within its virtual environment. SOURCE: https://docs.orbstack.dev/architecture LANGUAGE: General CODE: ``` Services are written in a mix of Swift, Go, Rust, and C. ``` -------------------------------- TITLE: OrbStack Initialization: Fish Shell Script DESCRIPTION: This snippet refers to a fix where the `fish` init script was incorrectly added to the `zsh` profile. This indicates OrbStack's integration with various shell environments. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` # Example of a fish init script (not the actual fix) # ~/.config/fish/config.fish ``` -------------------------------- TITLE: openEuler Distro Support DESCRIPTION: Adds support for the openEuler distribution for machines, expanding the range of compatible Linux environments. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Added openEuler distro for machines ``` -------------------------------- TITLE: NixOS Builder Support DESCRIPTION: Introduces NixOS builder support for x86_64 architecture on Apple Silicon, expanding compatibility for different Linux distributions. SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: System Call Tracing DESCRIPTION: Includes syscall tracepoints and tracefs support, allowing for detailed monitoring and analysis of system calls made by processes. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Added syscall tracepoints and tracefs ``` -------------------------------- TITLE: Automatic Data Migration from Docker Desktop DESCRIPTION: Facilitates automatic data migration from Docker Desktop, including containers and other configurations. This simplifies the transition to OrbStack. SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: Run Command on macOS using OrbStack Integration DESCRIPTION: Executes a command directly on the macOS system, integrated with OrbStack's command-line tools. This allows running native macOS commands from within the OrbStack context. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` mac uname -a ``` -------------------------------- TITLE: Faster Bind Mounts with Caching DESCRIPTION: Achieve significantly faster bind mounts through caching and optimizations, resulting in up to 3x faster search and 20x faster `git status` operations. SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: Switch Docker Context to Default After Uninstalling OrbStack DESCRIPTION: If you have uninstalled OrbStack, you need to switch your Docker context back to the default setting to resolve connection errors. This command reverts the context. SOURCE: https://docs.orbstack.dev/faq LANGUAGE: bash CODE: ``` docker context use default ``` -------------------------------- TITLE: Emulate Various Architectures DESCRIPTION: Provides support for emulating different CPU architectures including RISC-V, PowerPC, MIPS, and IBM Z. This is useful for testing software compatibility across diverse platforms. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Support for emulating RISC-V, PowerPC, MIPS, and IBM Z ``` -------------------------------- TITLE: Create Intel (x86) Linux Machine DESCRIPTION: This command demonstrates how to create a Linux machine with Intel (x86_64/amd64) architecture on an Apple Silicon Mac using the OrbStack CLI's `--arch` flag. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` orb create --arch amd64 ubuntu new-ubuntu ``` -------------------------------- TITLE: Istio Support DESCRIPTION: Introduces support for Istio, a popular service mesh for Kubernetes, enhancing microservices management within the OrbStack environment. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Added support for Istio (Kubernetes service mesh) ``` -------------------------------- TITLE: OrbStack CLI: Import/Export Container Images DESCRIPTION: This snippet demonstrates the OrbStack CLI commands for importing and exporting container images as .tar files. These commands are part of the UI improvements for managing container images. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` orb docker image import orb docker image export ``` -------------------------------- TITLE: Support for ublk DESCRIPTION: Adds support for `ublk`, a Linux block device subsystem, potentially enabling new use cases for block storage management within OrbStack environments. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Added support for ublk ``` -------------------------------- TITLE: Support for Legacy Docker Host DESCRIPTION: This update introduces support for the legacy `docker.for.mac.localhost` host, ensuring compatibility with older Docker configurations. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Support for legacy `docker.for.mac.localhost` host ``` -------------------------------- TITLE: File Watching and Live Reload DESCRIPTION: Implements file watching and live reload capabilities for Docker bind mounts, enabling automatic updates in development workflows. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` File watching & live reload support for Docker bind mounts ``` -------------------------------- TITLE: List Containers on Remote Host DESCRIPTION: Displays a list of running containers on a remote Docker host using a previously created Docker context. SOURCE: https://docs.orbstack.dev/features/debug LANGUAGE: bash CODE: ``` docker -c servy ps ``` -------------------------------- TITLE: Link Mac Commands for Linux Use DESCRIPTION: This shows how to use OrbStack's `mac link` command to make macOS executables (like `adb` and `fastboot`) available within the Linux environment. This is useful for tasks like Android development where you need to interact with devices from Linux. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` # Link commands mac link adb mac link fastboot # Then run them as usual ``` -------------------------------- TITLE: Environment Variable Forwarding DESCRIPTION: Introduces opt-in environment variable forwarding for machines, allowing specific environment variables to be passed to containerized applications. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Opt-in environment variable forwarding for machines ``` -------------------------------- TITLE: New Logs UI with Search and Tabs DESCRIPTION: A new user interface for logs has been introduced, featuring search capabilities and tabs specifically for Compose projects, improving log management and analysis. SOURCE: https://docs.orbstack.dev/release-notes -------------------------------- TITLE: eBPF Tracing Support DESCRIPTION: Provides full support for eBPF tracing tools such as bcc and bpftrace, enabling advanced system performance analysis and debugging. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Full support for eBPF tracing (bcc, bpftrace, etc.) ``` -------------------------------- TITLE: Menu Bar and Updater Fixes DESCRIPTION: Includes fixes for the menu bar application and the updater, enhancing overall stability and user experience. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Menu bar & updater fixes ``` -------------------------------- TITLE: Docker Container Management DESCRIPTION: Enhances Docker container management with search functionality, streamlined menus, and batch actions for containers, images, and volumes. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Docker container, image, and volume search ``` LANGUAGE: text CODE: ``` Streamlined Docker container menus ``` LANGUAGE: text CODE: ``` Batch actions (multi-select) for containers, images, and volumes ``` -------------------------------- TITLE: Buildx Version Update DESCRIPTION: Updates the bundled buildx tool to version 0.10.5, providing the latest capabilities for building container images. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Updates: buildx 0.10.5 ``` -------------------------------- TITLE: Docker Certificate Store Integration DESCRIPTION: Ensures that Docker and Linux environments correctly utilize the macOS certificate store, including self-signed CAs and `certs.d` configurations. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Docker & Linux will now use the macOS certificate store * Includes self-signed CA certificates and Docker `certs.d` ``` -------------------------------- TITLE: Open Kubernetes Services in Browser DESCRIPTION: Provides a one-click button to open Kubernetes services directly in the browser, simplifying access to service endpoints. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` One-click button to open Kubernetes services in browser ``` -------------------------------- TITLE: Live Refresh for Docker GUI DESCRIPTION: Implements live refresh functionality for the Docker GUI, ensuring that the interface always displays the most up-to-date information. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Live refresh for Docker GUI ``` -------------------------------- TITLE: Create a Docker Volume DESCRIPTION: This command shows how to create a persistent Docker volume named 'foo' using the `docker volume create` command. This volume can then be attached to containers for data storage. SOURCE: https://docs.orbstack.dev/docker/file-sharing LANGUAGE: bash CODE: ``` docker volume create foo ``` -------------------------------- TITLE: Update Bundled Software DESCRIPTION: Details updates to various bundled software components, including Docker, Linux kernel versions, and operating system images. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: General CODE: ``` Updates: Compose 2.23.3, buildx 0.12.0, Linux 6.5.13 ``` LANGUAGE: General CODE: ``` Updates: Docker 24.0.7, Linux 6.5.10, Ubuntu 23.10, Fedora 39, Debian 13 (testing) ``` LANGUAGE: General CODE: ``` Updates: Compose 2.22.0, Linux 6.5.7 ``` LANGUAGE: General CODE: ``` Updates: Linux 6.4.16 ``` LANGUAGE: General CODE: ``` Updates: Docker Engine 24.0.6, Linux 6.4.15 ``` LANGUAGE: General CODE: ``` Updates: Compose 2.21.0, Linux 6.4.13 ``` LANGUAGE: General CODE: ``` Updates: Linux 6.4.11, Devuan 5 ``` -------------------------------- TITLE: List OrbStack Machines DESCRIPTION: Lists all Linux machines or containers managed by OrbStack. SOURCE: https://docs.orbstack.dev/headless LANGUAGE: bash CODE: ``` orb list ``` -------------------------------- TITLE: Link macOS Command for Direct Linux Execution DESCRIPTION: Links a macOS command to be directly executable from within the OrbStack Linux environment without needing the 'mac' prefix. This streamlines workflows by making macOS utilities appear native. SOURCE: https://docs.orbstack.dev/machines/commands LANGUAGE: bash CODE: ``` mac link pbcopy ``` -------------------------------- TITLE: Create OrbStack Machine with Password DESCRIPTION: This command demonstrates how to create a new OrbStack machine (e.g., named 'new-ubuntu' running Ubuntu) and simultaneously set a default password for the user during creation. SOURCE: https://docs.orbstack.dev/machines LANGUAGE: bash CODE: ``` orb create --set-password ubuntu new-ubuntu ``` -------------------------------- TITLE: Menu Bar App Features DESCRIPTION: Introduces a menu bar application for quick actions, allowing users to manage containers and machines from anywhere, and hide the icon from the Dock. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Menu bar app with quick actions ``` LANGUAGE: text CODE: ``` Manage containers & machines from anywhere ``` LANGUAGE: text CODE: ``` Hide icon from Dock ``` -------------------------------- TITLE: Emulated ARM64 Containers DESCRIPTION: Supports running emulated `arm64` Docker containers on Intel processors, expanding compatibility for different architectures. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Support for emulated `arm64` Docker containers on Intel ``` -------------------------------- TITLE: Connect to Mac MySQL Server from Linux DESCRIPTION: Demonstrates how to connect to a MySQL server running on the macOS host from within a Linux machine using the special hostname `host.orb.internal`. SOURCE: https://docs.orbstack.dev/machines/network LANGUAGE: bash CODE: ``` mysql -h host.orb.internal -u root ``` -------------------------------- TITLE: Docker Image Management UI DESCRIPTION: Provides a dedicated user interface for managing Docker images, including viewing sizes and creation dates, and streamlining operations. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Docker image management UI ``` LANGUAGE: text CODE: ``` Docker volume sizes and creation dates ``` -------------------------------- TITLE: OrbStack CLI: Volume Import/Export DESCRIPTION: This snippet shows the OrbStack CLI commands for importing and exporting Docker volumes. These commands facilitate the management and transfer of persistent data used by containers. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` orb docker volume import orb docker volume export ``` -------------------------------- TITLE: OrbStack Permissions: macctl Commands DESCRIPTION: This snippet highlights a permission-related fix for running `macctl` commands within OrbStack machines. Custom users need to be added to the `orbstack` group for proper permissions. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: bash CODE: ``` # Add custom user to the orbstack group sudo usermod -aG orbstack ``` -------------------------------- TITLE: Docker UI Option-Click Skip Confirmation DESCRIPTION: Allows users to skip confirmation dialogs in the Docker UI by using Option-click, speeding up common operations. SOURCE: https://docs.orbstack.dev/release-notes LANGUAGE: text CODE: ``` Skip confirmation with Option-click ```