Skip to content
Alena edited this page Apr 5, 2023 · 5 revisions

Docker

Docker registry is server side application that stores and lets you distribute Docker images. Try the following configuration to use Artipie Docker Repository:

repo:
  type: docker
  storage:
    type: fs
    path: /var/artipie/data

Usage example

In order to push Docker image into Artipie repository, let's pull an existing one from Docker Hub:

docker pull ubuntu

Since the Docker registry is going to be located at {host}:{port}/{repository-name}, let's tag the pulled image respectively:

docker image tag ubuntu {host}:{port}/{repository-name}/myubuntuimage

Then, let's log in into Artipie Docker registry:

docker login --username {username} --password {password} {host}:{port}

And finally, push the pulled image:

docker push {host}:{port}/{repository-name}/myubuntuimage

The image can be pulled as well (first, remove it from local registry as it was downloaded and tagged before):

docker image rm {host}:{port}/{repository-name}/myubuntuimage
docker pull {host}:{port}/{repository-name}/myubuntuimage

Advanced options

Docker on port

Assign a port for the repository to access the image by name without using {repository-name} prefix. To do that we add port parameter into repository settings yaml:

repo:
  port: 5463
  type: docker
  storage:
    type: fs
    path: /var/artipie/data

Now we may pull image {host}:{port}/{repository-name}/myubuntuimage we pushed before as {host}:5463/myubuntuimage:

docker pull {host}:5463/myubuntuimage

In the examples above {host} and {port} are Artipie service host and port, {repository-name} is the name of Docker repository.