2014-04-15 20:53:12 -04:00
|
|
|
page_title: Repository
|
|
|
|
page_description: Definition of an Repository
|
2014-04-26 08:00:01 -04:00
|
|
|
page_keywords: containers, concepts, explanation, image, repository, container
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
# Repository
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
|
|
|
A repository is a set of images either on your local Docker server, or
|
2014-05-21 17:05:19 -04:00
|
|
|
shared, by pushing it to a [*Registry*](/terms/registry/#registry-def)
|
2014-04-15 20:53:12 -04:00
|
|
|
server.
|
|
|
|
|
|
|
|
Images can be associated with a repository (or multiple) by giving them
|
|
|
|
an image name using one of three different commands:
|
|
|
|
|
2014-06-29 21:31:15 -04:00
|
|
|
1. At build time (e.g., `sudo docker build -t IMAGENAME`),
|
|
|
|
2. When committing a container (e.g.,
|
2014-04-23 16:48:28 -04:00
|
|
|
`sudo docker commit CONTAINERID IMAGENAME`) or
|
2014-06-29 21:31:15 -04:00
|
|
|
3. When tagging an image id with an image name (e.g.,
|
2014-04-23 16:48:28 -04:00
|
|
|
`sudo docker tag IMAGEID IMAGENAME`).
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
A Fully Qualified Image Name (FQIN) can be made up of 3 parts:
|
|
|
|
|
|
|
|
`[registry_hostname[:port]/][user_name/](repository_name:version_tag)`
|
|
|
|
|
2014-04-23 16:48:28 -04:00
|
|
|
`username` and `registry_hostname` default to an empty string. When
|
|
|
|
`registry_hostname` is an empty string, then `docker push` will push to
|
|
|
|
`index.docker.io:80`.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
If you create a new repository which you want to share, you will need to
|
2014-04-23 16:48:28 -04:00
|
|
|
set at least the `user_name`, as the `default` blank `user_name` prefix is
|
|
|
|
reserved for official Docker images.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-21 17:05:19 -04:00
|
|
|
For more information see [*Working with
|
|
|
|
Repositories*](/userguide/dockerrepos/#working-with-the-repository)
|