Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: build failed: cannot check base image exists #2049

Closed
jgallucci32 opened this issue Oct 23, 2020 · 2 comments
Closed

Error: build failed: cannot check base image exists #2049

jgallucci32 opened this issue Oct 23, 2020 · 2 comments
Labels
feature: documentation meta: stale This issue/PR is stale and will be closed soon self-hosted type: feature request New feature or request

Comments

@jgallucci32
Copy link
Contributor

Describe the bug

When using a Dockerfile in your .gitpod.yml configuration while Gitpod is configured for an external Docker registry the following error appears:

Error: build failed: rpc error: code = Internal desc = cannot check base image exists: Error response from daemon: errors: denied: requested access to the resource is denied unauthorized: authentication required

This issue occurs if the custom Docker registry does not have the repositories workspace-images and base-images created prior. This was tested against Docker Trusted Registry specifically.

Steps to reproduce

  1. Deploy Gitpod self-hosted and configure for external Docker registry as follows:
  components:
    imageBuilder:
      registryCerts: []
      registry:
        name: registry.domain.local/gitpod
        secretName: external-registry-auth
  1. Launch Gitpod workspace

Expected behavior

Workspace is expected to build the image and launch the workspace.

Additional information

Red Hat Enterprise Linux 7.8
Docker CE 19.03.13
Gitpod 0.5.0

Fix

Create the workspace-images and base-images repositories in Docker Trusted Registry

Recommendation

Add this to the documentation as a dependency for external registries.

@jgallucci32
Copy link
Contributor Author

In case these are needed, here are the detailed logs from the image-builder pod:

{"buildRef":"registry.domain.local/gitpod/workspace-images:916dd604bdd22241ddfb4f465acc7521f0ad0e96602ff6b93780626502f1e5b2","message":"registering build","serviceContext":{"service":"image-builder","version":""},"severity":"info","time":"2020-10-22T17:07:02Z"}
{"buildRef":"registry.domain.local/gitpod/workspace-images:916dd604bdd22241ddfb4f465acc7521f0ad0e96602ff6b93780626502f1e5b2","message":"started listening to build logs","serviceContext":{"service":"image-builder","version":""},"severity":"info","time":"2020-10-22T17:07:02Z"}
{"baserefstr":"registry.domain.local/gitpod/base-images:efbd684c36732546cf58d15772f7c9c4f45bc2480324081d4c238ad6e6eefb57","buildRef":"registry.domain.local/gitpod/workspace-images:916dd604bdd22241ddfb4f465acc7521f0ad0e96602ff6b93780626502f1e5b2","message":"checking if base image exists","serviceContext":{"service":"image-builder","version":""},"severity":"debug","time":"2020-10-22T17:07:02Z"}
{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","buildRef":"registry.domain.local/gitpod/workspace-images:916dd604bdd22241ddfb4f465acc7521f0ad0e96602ff6b93780626502f1e5b2","error":"rpc error: code = Internal desc = cannot check base image exists: Error response from daemon: errors:
denied: requested access to the resource is denied
unauthorized: authentication required","message":"build failed","serviceContext":{"service":"image-builder","version":""},"severity":"warning","time":"2020-10-22T17:07:02Z"}
{"buildRef":"registry.domain.local/gitpod/workspace-images:916dd604bdd22241ddfb4f465acc7521f0ad0e96602ff6b93780626502f1e5b2","message":"deregistering build","serviceContext":{"service":"image-builder","version":""},"severity":"info","status":"done_failure","time":"2020-10-22T17:07:02Z"}
{"message":"build was closed but not successful","serviceContext":{"service":"image-builder","version":""},"severity":"info","status":3,"time":"2020-10-22T17:07:02Z"}
{"message":"closing build listener","serviceContext":{"service":"image-builder","version":""},"severity":"debug","time":"2020-10-22T17:07:02Z"}

@stale
Copy link

stale bot commented Mar 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 17, 2021
@stale stale bot closed this as completed Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: documentation meta: stale This issue/PR is stale and will be closed soon self-hosted type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants