# Mirroring an Image

How to mirror an image to a local docker repository

To mirror an image simply run the command

1docker-mirror -d docker.example.com golang:alpine

Where docker.example.com is the url to your local repository and golang:alpine is the image you want to mirror.

Once complete your mirror of the image can be retrieved with the tag docker.example.com/library/golang:alpine

In the above example the golang:alpine image is pushed as library/golang:alpine. This is because in docker the source image is in the library project, so if an image does not contain a project then it gets the library project inserted during the pull.
For example, mirroring area51/example:latest would mirror it as docker.example.com/area51/example:latest