Appearance
Using Docker with RepoForge.io
RepoForge.io allows you to host private Docker images, making it easy to manage and distribute containerized applications securely. This guide will walk you through the steps to create a Docker registry in RepoForge.io, push images, and manage access.
Creating a Docker Registry in RepoForge.io
Before you can push Docker images to RepoForge.io, you need to create a Docker registry via the RepoForge.io dashboard. Follow these steps:
- Log in to your RepoForge.io dashboard.
- Navigate to Docker Registries in the side menu.
- Click Create New Docker Registry.
- Give your registry a name (it must be valid Docker registry name)
Once the registry is created, you’ll be given a unique URL that you can use to log in and push images to your Docker registry.
Building and Pushing Docker Images to RepoForge.io
After setting up your Docker registry, you can build and push Docker images to it using the following commands:
- Log in to your RepoForge.io Docker registry:
Use the Docker CLI to log in to your newly created registry. You can authenticate using either your RepoForge.io username and password or an access token with the appropriate role.
bash
docker login docker.repoforge.io/repoforge-hash-id/name-of-registry
It's possible to login using either your username/password, or using an access token as the password value (in which case, the username can be any value). Whether you user user credentials or an access token, you must have assumed the Docker - Full access
role to push new/updated docker images, or the Docker - Read only
role to pull images.
- Build your Docker image:
Build your Docker image using the standard docker build
command. Replace name-of-registry
with the desired tag name for your image.
bash
docker build -t name-of-registry .
- Tag your Docker image:
After building the image, you need to tag it with the full path to your RepoForge.io registry, including the registry URL and image name:
bash
docker tag name-of-registry docker.repoforge.io/repoforge-hash-id/name-of-registry:latest
- Push your Docker image to RepoForge.io:
Finally, push the tagged image to your RepoForge.io Docker registry:
bash
docker push docker.repoforge.io/repoforge-hash-id/name-of-registry:latest
Your image will now be stored in your RepoForge.io Docker registry. If you refresh your dashboard in a web browser, you should now be able to see it listed under the registry you just created.
Pulling Docker Images from RepoForge.io
To pull images from your RepoForge.io Docker registry, ensure that you are logged in with credentials that have either the Docker - Full access
or Docker - Read only
role.
Log in as you did above (assuming you haven't already done so)
bash
docker login docker.repoforge.io/repoforge-hash-id/name-of-registry
Pull your docker image:
bash
docker pull docker.repoforge.io/repoforge-hash-id/name-of-registry:latest
Further note about authentication
It's also possible to pull docker images without auth by making them public, or control access more strictly by enabling registry-level permissions. Refer to Authentication and permissions for more information