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

Can't pull Ubuntu image #151

Closed
pauldraper opened this issue Apr 13, 2023 · 1 comment · Fixed by #166
Closed

Can't pull Ubuntu image #151

pauldraper opened this issue Apr 13, 2023 · 1 comment · Fixed by #166
Assignees
Milestone

Comments

@pauldraper
Copy link

pauldraper commented Apr 13, 2023

I try to pull an Ubuntu image from DockerHub.

oci_pull(
    name = "ubuntu",
    tag = "latest",
    image = "index.docker.io/library/ubuntu",
    platforms = [
        "linux/amd64",
    ],
)

I run:

bazel run @ubuntu_unpinned//:pin

It fails:

paul@Pauls-MBP redoapp % bazel run @ubuntu_unpinned//:pin
INFO: Invocation ID: 92366a73-2771-4d90-a1e8-d5c1adc254c8
DEBUG: /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl:235:14: 
WARNING: fetching from https://index.docker.io/v2/library/ubuntu/manifests/latest without an integrity hash. The result will not be cached.
INFO: Repository ubuntu_unpinned instantiated at:
  /Users/paul/Dev/redoapp/redoapp/WORKSPACE.bazel:206:23: in <toplevel>
  /Users/paul/Dev/redoapp/redoapp/tools/container/workspace.bzl:4:13: in container_repositories
  /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl:582:16: in oci_pull
Repository rule pin_tag defined at:
  /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl:527:26: in <toplevel>
WARNING: Download from https://index.docker.io/v2/library/ubuntu/manifests/latest failed: class java.io.FileNotFoundException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'ubuntu_unpinned':
   Traceback (most recent call last):
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 512, column 33, in _pin_tag_impl
                downloader.download_manifest(rctx.attr.tag, "manifest_list.json")
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 282, column 74, in lambda
                download_manifest = lambda identifier, output: _download_manifest(rctx, state, identifier, output),
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 248, column 14, in _download_manifest
                _download(rctx, state, identifier, output, "manifests")
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 237, column 20, in _download
                download_fn(
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/private/download.bzl", line 117, column 25, in _bazel_download
                return rctx.download(**kwargs)
Error in download: java.io.IOException: Error downloading [https://index.docker.io/v2/library/ubuntu/manifests/latest] to /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/ubuntu_unpinned/manifest_list.json: GET returned 404 Not Found
ERROR: /Users/paul/Dev/redoapp/redoapp/WORKSPACE.bazel:206:23: fetching pin_tag rule //external:ubuntu_unpinned: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 512, column 33, in _pin_tag_impl
                downloader.download_manifest(rctx.attr.tag, "manifest_list.json")
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 282, column 74, in lambda
                download_manifest = lambda identifier, output: _download_manifest(rctx, state, identifier, output),
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 248, column 14, in _download_manifest
                _download(rctx, state, identifier, output, "manifests")
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/pull.bzl", line 237, column 20, in _download
                download_fn(
        File "/private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/rules_oci/oci/private/download.bzl", line 117, column 25, in _bazel_download
                return rctx.download(**kwargs)
Error in download: java.io.IOException: Error downloading [https://index.docker.io/v2/library/ubuntu/manifests/latest] to /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/ubuntu_unpinned/manifest_list.json: GET returned 404 Not Found
ERROR: java.io.IOException: Error downloading [https://index.docker.io/v2/library/ubuntu/manifests/latest] to /private/var/tmp/_bazel_paul/5a5efa90f7fa1e8cbf1caad71f9e5c69/external/ubuntu_unpinned/manifest_list.json: GET returned 404 Not Found
INFO: Elapsed time: 0.629s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
ERROR: Build failed. Not running target

I'm using macOS arm64.

@thesayyn
Copy link
Collaborator

Oh looks like ubuntu images now use oci image types. This will need a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants