Socktainer: a Docker-compatible API in front of Apple containers
Docker-compatible REST API on top of Apple container
At a glance
- What is it?
- Socktainer is a Swift CLI and daemon that exposes a Docker Engine compatible REST API on top of Apple's containerization framework, so the Docker CLI can drive local macOS containers without Docker installed. The compatibility is partial and the requirements are narrow, and the README is honest about both.
- Who is it for?
- Socktainer fits a macOS developer on Apple Silicon who wants to use the Docker CLI and the Docker API surface against Apple containers, particularly in CI where the same commands need to drive whatever container runtime the machine has.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly Swift, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A Docker-shaped front end for Apple containers
Socktainer is described as a CLI and daemon that exposes a Docker-compatible REST API on top of Apple's containerization libraries, and the project description puts it more plainly: it allows common Docker clients, like the Docker CLI, to interact with local containers on macOS using the Docker API surface. The mechanism is a translation layer, not a reimplementation. The backend is Apple's Container Framework, the front end is the Docker Engine API, and the two are joined by a process that speaks the HTTP API on a Unix domain socket.
The compatibility target is stated precisely. Socktainer maintains compatibility with Docker Engine API v1.51, and progress is tracked in two issues, #14 and #90, which tells you the project is not yet at parity and that the tracking is public. The API compatibility itself is listed as partial in the key features, and the operations it covers are container lifecycle with inspect, stop and remove, image listing, pulling, deletion and logs, health checks, container stats, and exec without interactive mode. The repository is written in Swift with a Package.swift, a Sources/ directory, Tests/, an entitlements.plist for the macOS sandbox, a pkginstaller/ directory and a Makefile. The licence is Apache-2.0 and the last push to the repository was on 2026-10-14, with recent releases v1.5.3 from 2026-10-12, v1.5.2 from 2026-10-09 and v1.5.1 from 2026-10-08.
The Docker context is the integration point
The way you connect the Docker CLI to Socktainer is through a Docker context, and it is registered automatically when the daemon starts. The launch output makes the sequence explicit.
./socktainer
[ INFO ] Docker context 'socktainer' ready — run: docker context use socktainer
[ NOTICE ] DNS server listening on port 2054
[ NOTICE ] Server started on http+unix: $HOME/.socktainer/container.sock
...Two details in that output matter. The server listens on a Unix domain socket at $HOME/.socktainer/container.sock rather than on a TCP port, so the API is not exposed to the network by default, and there is a separate DNS server on port 2054, which is what lets container name resolution work for the images the backend pulls.
Activating the context is a single command, after which you use Docker normally.
docker context use socktainerdocker ps # List running containers
docker ps -a # List all containers
docker images # List available imagesAnd you switch back to another runtime the same way, with docker context use colima or docker context use default. If you would rather not have the context file written at all, there is a --no-docker-context flag, and the README is careful to note that it skips creating the context but does not remove one that already exists, which you do with docker context rm socktainer.
It starts Apple's service for you, unless you tell it not to
There is one piece of automation worth understanding before you run it, because it manages a system service on your machine. If Apple's own service is not already running, Socktainer starts it automatically first, and the README compares this to what colima does for Docker, with no separate container system start step needed. The startup output shows the sequence.
Launching container-apiserver...
[ INFO ] Apple Container service not running — attempting to start it...
[ INFO ] Apple Container service started
[ INFO ] Docker context 'socktainer' ready — run: docker context use socktainer
...The opt-out is a flag rather than a configuration file.
socktainer --no-auto-startThe README explains the intended use, which is CI or environments where you manage Apple's Container lifecycle yourself. It also notes what happens if the service still is not running: the normal compatibility check catches it and aborts with a clear message rather than starting Socktainer against a dead backend. That is a sensible failure mode, and the flag is worth using in CI where you want the build to fail loudly rather than have a service started underneath the job.
DOCKER_HOST as an alternative to the context
If you would rather not use a Docker context, the same socket can be pointed at directly through DOCKER_HOST, and the README gives both the exported form and the inline form.
export DOCKER_HOST=unix://$HOME/.socktainer/container.sock
docker ps
docker imagesDOCKER_HOST=unix://$HOME/.socktainer/container.sock docker ps
DOCKER_HOST=unix://$HOME/.socktainer/container.sock docker imagesThis matters for CI systems and scripts that construct their own environment, where a context file in the user's Docker configuration is not necessarily present. The DOCKER_HOST approach has the same effect as switching context for the duration of the command, without touching global state.
Two operational details in the key features are worth flagging. The docker stats output reports memory against the Apple Container VM limit rather than the host RAM, and that limit is configurable with a --memory flag whose default is 1 GiB per container. So a container that looks like it is using 900 MiB is not necessarily near the machine's capacity, it is near its own budget. And the daemon broadcasts container events, which is what a client uses to decide whether it is still alive.
Volume sync mode changes the durability of writes
Named volumes default to nosync, which means guest fsync() calls are not flushed through to the underlying storage in the same way. The section is cut off in the version of the README available here, so the exact wording of the default and the opt-in is not available to quote, but the mechanism is clear from the section heading and the first sentence: the volume sync mode is a per-volume decision rather than a global one, and the safe default is to assume a named volume does not honour fsync the way a local Docker volume does.
This is the kind of detail that separates a compatibility shim from a real runtime, and it is worth checking for your own workload before you point a database at it. The README has a separate section on volume compatibility for Postgres, which suggests the same concern applies there, and a database that assumes fsync durability is exactly the case where a nosync default would bite.
The Makefile also documents the version range the build targets, with the Docker Engine API minimum version exported as 1.32 and the maximum as 1.51, matching the v1.51 compatibility claim in the README.
Narrow requirements: macOS 26 on Apple Silicon
The requirements section is short and restrictive. You need macOS 26, Tahoe, on Apple Silicon, arm64, and the README says Apple's container APIs only work on arm64 Macs. You also need Apple Container 1.5.0. That is a hard floor rather than a preference, and it is the first thing to check before anything else about this project.
The installation routes reflect the maturity of the project. Homebrew is the primary path, with the formula in Homebrew Formulae and brew install socktainer, and there is a --HEAD variant for the latest head version. The README also notes that the project used to provide its own tap and that you may want to integrate with the official Homebrew, with a brew untap socktainer/tap command for that. The other route is the GitHub releases page, where you download the zip or the binary and ensure the binary has execute permissions before running it.
The site is socktainer.github.io, the project is on Discord, and the Podman Desktop Apple Container extension uses Socktainer to visualise Apple containers and images inside Podman Desktop, which is a good sign that the API surface is being exercised by a third party rather than only by its own author.
Where a Docker shim is the wrong answer
Three cases point elsewhere. The first is a machine that is not a recent Apple Silicon Mac, since the requirement is macOS 26 on arm64 with Apple Container 1.5.0 and there is no other platform target. The second is a team that needs the Docker API in full. The compatibility is described as partial, the supported version range in the Makefile spans API versions 1.32 to 1.51, and the two tracking issues in the README are open, so a script that depends on an endpoint outside the covered set will fail in a way that is specific to this backend rather than to Docker itself.
The third is a production deployment. Socktainer is a compatibility layer that translates one API onto another runtime, and the project documentation gives no indication of authentication, multi-user access, or the kind of hardening you would expect from something serving a container control API to more than one client. It runs on a Unix socket in your home directory, which keeps it off the network, but the endpoint it exposes is the same endpoint that can create and remove containers.
The alternative worth comparing against is talking to the Apple Container tooling directly, or running the Docker CLI against a real Docker or Colima installation. The difference in approach is that Socktainer buys you one thing, which is that your existing docker commands and any tooling that speaks the Docker API keep working against Apple containers, and the cost is a translation layer that is only as good as its coverage of the API you actually use.
Editorial conclusion
Socktainer fits a macOS developer on Apple Silicon who wants to use the Docker CLI and the Docker API surface against Apple containers, particularly in CI where the same commands need to drive whatever container runtime the machine has. It does not fit anyone outside macOS 26 on arm64 with Apple Container 1.5.0, since the README says Apple's container APIs only work on arm64 Macs, and it does not fit a team that needs the full Docker API, because the compatibility is described as partial. Before you adopt it, read the Security and Limitations section on the project site and check the compatibility tracker issues linked from the README, since the API version it targets is Docker Engine API v1.51.
Frequently asked questions
What is Socktainer?
It is a CLI and daemon that exposes a Docker-compatible REST API on top of Apple's containerization libraries, allowing common Docker clients, such as the Docker CLI, to interact with local containers on macOS through the Docker API surface. It is written in Swift and licensed under Apache-2.0.
How do I install Socktainer?
With Homebrew, using brew install socktainer, or brew install socktainer --HEAD for the latest head version. The package is in the official Homebrew Formulae, and the project previously shipped its own tap, which you can remove with brew untap socktainer/tap. You can also download the zip or binary from the GitHub releases page and make sure it has execute permissions.
What are the system requirements for Socktainer?
macOS 26, Tahoe, on Apple Silicon, since the README says Apple's container APIs only work on arm64 Macs, and Apple Container 1.5.0. The container runtime itself is started automatically if it is not already running, unless you pass --no-auto-start.
How do I point the Docker CLI at Socktainer?
Socktainer registers a Docker context on startup, so you activate it once with docker context use socktainer and then use Docker normally. Alternatively you can set DOCKER_HOST to the Unix socket at $HOME/.socktainer/container.sock, either exported or inline for a single command. Pass --no-docker-context to skip writing the context file.
Is the Docker API support complete in Socktainer?
No. The README lists Docker REST API compatibility as partial and says Socktainer maintains compatibility with Docker Engine API v1.51, with progress tracked in issues #14 and #90. The Makefile sets the supported range with a minimum of 1.32 and a maximum of 1.51, and named volumes default to nosync, meaning guest fsync() calls are not flushed through.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/socktainer-socktainer)Was this useful?