docker-wrapper
After my switch from Docker.app to Apple’s Container I was pretty happy with its performance but kept running into usability issues. Docker CLI always had a pretty weird command syntax, that I oftentimes had to look up or wrap into little helper shell scripts.
But now having to do this on the Apple side is doubly annoying. The internet runs on Docker1 and almost all the software, tutorials and instructions come with a Dockerfile, Docker Compose YAML or Docker CLI invocations that needed to be extra translated for Container.
I have now vibe-coded a wrapper script that acts as Docker, takes in all the regular commands and translates them to Apple Container ones (or warns you about missing features in its output).
The repo is split up into smaller modules per Docker command to make it easier to navigate and maintain the thing should either Docker or Apple break it.
Installation
On my machines there is a bin directory in $HOME, which I’ve had added to $PATH for years now and where all my convenience scripts lie. Thus that is the natural place for me to put it, but since I did only want the wrapper there and not all the modules or tests, I placed the repo elsewhere and created a symlink to the docker.sh2:
bin $ ln -s $path_to_repo/docker.sh docker
The repo even comes with an install.sh that does exactly this.
-
Which is why Dockerfile remains King and unfortunately Containerfile and OCI-Containers are going nowhere ↩
-
Similar to my Kotlin Tooling Wrapper ↩