Running docker compose in Apple container: DNS names and SSH make it easier
This article updates an earlier guide to running Docker Compose inside Apple container, first written in June 2026, and retests it on container 1.7.1 in November 2026. Apple container itself still does not support Compose: a pull request adding it (apple/container#398) was closed without merging in April 2026, and the maintainer said upstream is not considering Compose for now. Users are pointed to an external plugin instead, and third-party tools such as Container-Compose cover Compose features to different degrees.
The author still runs real Docker and Compose inside a container machine, but the setup is now simpler. Each machine gets a DNS name in the form <name>.machine, so after one run of sudo container system dns create machine, ubuntu.machine works even when the IP changes, and the forwarding script from the earlier article is not needed. From the Mac, the Docker CLI connects with DOCKER_HOST[1]=ssh://$USER@ubuntu.machine, so dockerd does not need to be opened over unauthenticated TCP.
The machine runs Ubuntu 26.04, Docker 29.9.3 and Compose v5.7.1 from Docker's official repository. A new install needs no kernel change, because since version 1.0.0 the default kernel already includes netfilter[2]; upgraded environments still need container system kernel set --recommended --force. The Compose version jumped from v2 to v5 because v3 and v4 were skipped, to avoid confusion with files that have version: "3.x", and from v5 onward builds are handed to Docker Bake[3].
Sources
-
JPZenn JA
Apple container で docker compose を動かす(DNS 名と SSH で簡単になった)


