All Products
Search
Document Center

Troubleshoot container image repository build service failures

Last Updated: Oct 20, 2020

Overview

Alibaba Cloud Container Registry within the build out our services you can call on from your source code, set is based on Dockerfile of build rules, automatic image build run Dockerfile to perform the build and how to build it; After the completion of the auto-commit image to the image depending on the CI ability. Errors may lead to image building failures. This topic describes the possible problems during container image building, the causes of failures, and the solutions.

Description

Problem Type Problem description Solution
Failed to bind source code repository
Note: to use the container registry service, you must select to bind the corresponding code repository when creating an image repository.

An error of type "source code account does not have access" occurred while selecting code sources.

Check whether the code source binding is successful.

The code source is selected successfully, but the code repository you created cannot be found.

  • No code warehouse is listed.
  • Code repositories of the subgroup type are not supported.
  • Official gitlab (address: https://www.gitlab.com Many code repositories are displayed in the drop-down list, but you cannot find your own code repository.

Select a solution based on the corresponding problem scenario:

  • The network quality of the cross-domain is poor. To resolve this issue, you can enter a namespace and repository name.
  • Currently, logtail only supports the directory structure of namespace/group and repository, and does not support the directory structure of subgroup.
  • This is because the drop-down list lists all public warehouses. In this case, you can manually enter the namespace and repository name.
The repository is created successfully, but the build bar is not found.

To create an image repository bound to source code in the container registry console, follow these steps:

  1. ACR will create a mirror warehouse first.
  2. ACR uses the authorization token to request your code repository and creates a webhook in the repository.
  3. Bind your code repository to the image repository created in step 1.

After successfully completing the entire process:

  • The build bar is displayed on the repository details page.
  • If the build bar is not found, confirm it in sequence as follows:
    1. Refresh the frontend page to check whether the application is created.
    2. Make sure that the token you issued to ACR has the permission to create a webhook.
    3. Ensure that the information in namesapce, repository, and Git repository URLs is consistent.
Failed to create build rule The number of build rules exceeds the limit.

If you require this type of quota, submit a ticket to increase the quota.

Automatic build failure The ACR container image building system relies on the webhook request sent by your source code platform to match the building rule, and then triggers the image building. In this case, the building fails.
  • The webhook in the code library has been mistakenly deleted.
    You must recreate a webhook.
  • In your code repository, namesapce, repository, and URL of the Git repository are inconsistent. It is likely that you changed the username and repository name:
    You need to roll back the change operation.
Slow construction speed The image building speed is too slow, which may be affected by code pulling, image pulling, and resource downloading. This kind of problem is mainly affected by cross-domain poor network quality and low speed.

Use ACR product capabilities to accelerate build:

  • You can perform the following steps to build a ACR-EE Enterprise Edition instance:
    1. You can use the acceleration capability provided by an overseas origin.
    2. If acceleration from overseas sources affects the pulling speed of data from domestic sources, you can also select direct pull from domestic sources.
    3. These two capabilities are combined to differentiate a variety of acceleration sources for an efficient construction experience.
  • For the default instance build service of ACR, see the following steps:
    1. You can use overseas Machine building options.
    2. You can use build cache.
Source code related failure The error message returned because the source code repository does not exist or you are not authorized to perform the operation.

If you change the username of the Alibaba Cloud Code account, the remote Code library cannot be pulled. See the following steps:

  1. Roll back the changed user name.
  2. Submit a ticket to re-bind the Alibaba Cloud Code account.
Source code pull timeout.

Cross-domain source code pull times out due to unstable network quality. See use the acceleration feature to speed up code pulling. For more information, see the slow building feature section.

Failed to pull the image. Failed to pull images from overseas sources.

ACR Container Build system has mirror dockerhub source. However, if you are using images from a foreign cloud vendor, the cross-domain link may affect the pull speed. You can resolve the issue using the following methods:

  • We recommend that you back up the image to Container Registry and use the container registry image as the build process.
  • You can use the overseas build capability.
Failed to pull the Alibaba Cloud VPC domain name image from the ACR default instance.

Use the public domain name of the default instance for image building.

ACR-EE Enterprise Edition instance fails to pull the Alibaba Cloud Public Network domain name image.

To build an image for the Container Registry Enterprise Edition instance, use a domain name that is connected to the VPC.

Submit a ticket to solve other problems.
Failed to push the image.

After the build succeeds, the image push fails due to network problems.

  • Failed to push the default instance image:
    If you use an image built by an ECS instance outside mainland China, the image may fail to be pushed to domestic regions due to network problems cross-domain. Retry the operation or switch from a production environment to a domestic one.
  • Failed to push the Enterprise edition instance image.
    ACR-EE Enterprise edition uses the internal network to push images. If the push fails, submit a ticket.
Long wait time for build task The build service for both the ACR default instance and the Enterprise edition instance limits the number of concurrent builds for a single user.
  1. If you determine that the task is waiting because the number of concurrent builds exceeds the upper limit, you can solve the problem using the following methods:
    • Default instance users can upgrade to Enterprise Edition.
    • Enterprise Edition instance users can apply for an increase to the quota.
  2. If you have not exceeded the limit on the number of concurrent builds but the task is still in the waiting state for a long time, submit a ticket.
The build process failed. The causes of errors during the build process are very responsible, but they can be divided into the following two types and solved by solution.
  • Resource pull timeout:
    See solution to slow building to speed up your image building.
  • Failed to execute the build command.
    If there are no exceptions in the local machine building process, submit a ticket for assistance.

Application scope

  • Container Registry