tencent cloud


Docker Repository

Last updated: 2024-01-02 10:31:18
    This document describes how to store Docker artifacts in CODING-AR for centralized artifact management and version control. The following sections introduce how to create an image, configure authentication, and pull and push artifacts.

    Open CODING-AR

    1. Log in to the CODING Console and click Use Now to go to CODING page.
    2. Click
    in the upper-right corner to open the project list page and click a project icon to open the project.
    3. In the menu on the left, click Artifact Management.


    Before you begin:
    Install Docker.
    Create an artifact repository (see Basic Operations).
    Select Docker as the repository type.

    Create an Image (Optional)

    This section describes how to quickly create a demo Docker image. You can skip this section if you are familiar with Docker images.

    Method 1: create an image locally

    1. In a local directory, create a Dockerfile with the following content:
    FROM coding-public-docker.pkg.coding.net/public/docker/nodejs:12
    2. Run the following command in the directory to build an image.
    docker build -t hello-world .
    The image is created with a default tag hello-world:latest. Refer to the Docker documentation for customized tags in the format of <Image Name>:<Version>.

    Method 2: pull an image from Docker Hub

    1. Run the following command in the terminal to pull an image.
    docker pull hello-world
    2. Run the following command to view the images pulled.
    docker images

    Configure Authentication Information

    After creating a local artifact, you can push it to the remote repository. Before the push, you need to locally configure the authentication information of the remote repository.

    Access token

    We recommend you use an access token to generate the authentication configuration.
    1. Click Operation Guide on the repository page.
    2. Enter the login password/two-step verification code and then copy the command generated.
    3. Paste and run the command in the local Docker environment to complete the authentication.

    Push an Image

    The following commands are for reference only. Use the commands generated in your project.
    1. Tag the hello-world image pulled in the above section.
    docker tag hello-world straybirds-docker.pkg.coding.net/coding-demo/coding-demo/hello-world
    2. Push your docker image to CODING-AR.
    docker push straybirds-docker.pkg.coding.net/coding-demo/coding-demo/hello-world
    The following information will be displayed after the image is pushed successfully.
    All the commands described above are displayed in the operation guide. Replace the variables and then run the commands.

    View an Image

    After the image is pushed, the activity will be shown in Project Overview.
    You can see the hello-world image in the artifact list.
    Click the image name to view its information, including overview, guide, properties, and version list.

    Pull an Image

    Run docker pull to pull a Docker image from CODING-AR. You can use the command generated in the Guide.
    The following information will be displayed after the image is pulled successfully.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support