Zum Inhalt springen

Create your first Container Registry

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

In this Getting started guide you will create an instance and configure it. This guide shows the most common settings for a small developer environment. When following this guide, you will work with the STACKIT Portal.

  1. Visit the STACKIT portal.
  2. On the sidebar click on Container Registry.
  3. In the information box click on Go to Container Registry.

After completing the steps, you see the login page for Container Registry. Login with your STACKIT credentials to create a Container Registry Account and get access to the container registry.

  1. Navigate to the Project Creation Page.

    After logging in, click on the “Projects” tab, usually located in the left navigation menu. This will take you to a page that lists all existing projects.

  2. Click on the “New Project” Button.

    This button is usually located in the top left corner of the page or in a prominent location on the page. Click on this button to start the project creation process.

  3. Enter project details.

    You will be presented with a form that asks for project details. Fill in the required information, which typically includes:

    • Project Name: Enter a unique and descriptive name for your project.
    • Visibility: In the Beta version of STACKIT Container Registry, all projects will be private. This means that you will have to proactively invite new users to your new projects in order for them to have access to it. You will only be able to do so once said users have already registered in the tool.
  4. Finish project creation.

    Once you have filled in the required information and configured any additional settings, click on the OK button.

To access the container registry, you’ll need to log in using your credentials. There are two ways to do this:

  1. Open a terminal or command prompt.
  2. Run the following command: docker login registry.onstackit.cloud.
  3. Enter your STACKIT email address as the username.
  4. Enter your password, which can be found in the User Profile section under the CLI secret field.

Tag the Docker image that you want to upload with the project name and a version number. The format of the tag will typically be registry.onstackit.cloud/[project-name]/[image-name]:[version].

As an example we use Nginx:

  1. Pull a public Nginx image.

    Terminal window
    docker pull Nginx
  2. Create an alias of the image.

    Terminal window
    docker tag Nginx registry.onstackit.cloud/[project-name]/Nginx:latest
  3. Push the image to your registry.

    Terminal window
    docker push registry.onstackit.cloud/[project-name]/Nginx

Once the push command has finished, you can view your newly pushed image in the repository overview of your container registry project. Log in to the container registry web interface and navigate to the project where you uploaded the image. Verify that the image has been uploaded successfully and is visible in the project.

  1. Pull Nginx Image from STACKIT Container Registry.

    Terminal window
    docker pull registry.onstackit.cloud/[project-name]/Nginx:latest
  2. Start the Nginx container from STACKIT Container Registry.

    Terminal window
    docker run -it --rm -p 8080:80 registry.onstackit.cloud/[project-name]/Nginx
  3. Open your browser and open http://localhost:8080 to view the running container.

  4. To stop and remove the container, press Control+C in your terminal.

If you no longer need the Nginx image, you can delete it locally with the docker rmi command.

Terminal window
docker rmi registry.onstackit.cloud/[project-name]/Nginx
  1. Go to the repository overview of your project.
  2. Select all repositories in the list.
  3. Click the deletion button.
  4. Confirm repository deletion by clicking Delete.
  5. Go to the Container Registry Projects Overivew.
  6. Select your project.
  7. Open the Action dropdown menu.
  8. Click Delete.
  9. Confirm Deletion by clicking Delete.

Now you executed some basic commands with STACKIT Container Registry. From here on you may dig deeper with the How-tos.