macOS setup guide


This page contains information about hosting your own registry using the open source Docker Registryopen_in_new. For information about Docker Hub, which offers a hosted registry with additional features such as teams, organizations, web hooks, automated builds, etc, see Docker Hub.


This is useful if you intend to run a registry server natively on macOS.


You can start a VM on macOS, and deploy your registry normally as a container using Docker inside that VM.


Using the method described here, you install and compile your own from the git repository and run it as an macOS agent.


Production services operation on macOS is out of scope of this document. Be sure you understand well these aspects before considering going to production with this.

Setup golang on your machine

To set up golang on your machine, run:

bash < <(curl -s -S -L
source ~/.gvm/scripts/gvm
gvm install go1.4.2
gvm use go1.4.2

See How to Write Go Codeopen_in_new, for more details.

Checkout the Docker Distribution source tree

mkdir -p $GOPATH/src/
git clone $GOPATH/src/
cd $GOPATH/src/

Build the binary

GOPATH=$(PWD)/Godeps/_workspace:$GOPATH make binaries
sudo mkdir -p /usr/local/libexec
sudo cp bin/registry /usr/local/libexec/registry


Copy the registry configuration file in place:

mkdir /Users/Shared/Registry
cp docs/recipes/osx/config.yml /Users/Shared/Registry/config.yml

Run the Docker Registry under launchd

Copy the Docker registry plist into place:

plutil -lint docs/recipes/osx/com.docker.registry.plist
cp docs/recipes/osx/com.docker.registry.plist ~/Library/LaunchAgents/
chmod 644 ~/Library/LaunchAgents/com.docker.registry.plist

Start the Docker registry:

launchctl load ~/Library/LaunchAgents/com.docker.registry.plist

Restart the docker registry service

launchctl stop com.docker.registry
launchctl start com.docker.registry

Unload the docker registry service

launchctl unload ~/Library/LaunchAgents/com.docker.registry.plist