2013-04-01 19:11:09 -07:00
|
|
|
.. _working_with_the_repository:
|
2013-03-29 17:30:10 -07:00
|
|
|
|
|
|
|
Working with the repository
|
|
|
|
============================
|
|
|
|
|
|
|
|
Connecting to the repository
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
You create a user on the central docker repository by running
|
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
.. code-block:: bash
|
2013-03-29 17:30:10 -07:00
|
|
|
|
|
|
|
docker login
|
|
|
|
|
|
|
|
|
|
|
|
If your username does not exist it will prompt you to also enter a password and your e-mail address. It will then
|
|
|
|
automatically log you in.
|
|
|
|
|
|
|
|
|
|
|
|
Committing a container to a named image
|
|
|
|
---------------------------------------
|
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
In order to commit to the repository it is required to have committed your container to an image with your namespace.
|
2013-03-29 17:30:10 -07:00
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
.. code-block:: bash
|
2013-03-29 17:30:10 -07:00
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
# for example docker commit $CONTAINER_ID dhrp/kickassapp
|
|
|
|
docker commit <container_id> <your username>/<some_name>
|
2013-03-29 17:30:10 -07:00
|
|
|
|
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
Pushing a container to the repository
|
2013-03-29 17:30:10 -07:00
|
|
|
-----------------------------------------
|
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
In order to push an image to the repository you need to have committed your container to a named image (see above)
|
2013-03-29 17:30:10 -07:00
|
|
|
|
|
|
|
Now you can commit this image to the repository
|
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
.. code-block:: bash
|
2013-03-29 17:30:10 -07:00
|
|
|
|
2013-04-01 19:11:09 -07:00
|
|
|
# for example docker push dhrp/kickassapp
|
|
|
|
docker push <image-name>
|
2013-03-29 17:30:10 -07:00
|
|
|
|