GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docker/install: Fix latest image install on lima by vvoland · Pull Request #480 · docker/actions-toolkit

Conversation

@vvoland

@vvoland vvoland commented Oct 30, 2024

Copy link
Copy Markdown
Contributor

latest is not a valid git tag or revision to get the matching systemd unit files.
Look up the exact source git commit from the org.opencontainers.image.revision image config label.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vvoland vvoland mentioned this pull request Oct 30, 2024
Support downloading binaries from docker images docker/setup-docker-action#106
Merged
@crazy-max

crazy-max commented Oct 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

https://github.com/docker/actions-toolkit/actions/runs/11591165912/job/32270352253?pr=480#step:10:745

        wget https://raw.githubusercontent.com/moby/moby/27.3.1/contrib/init/systemd/docker.service         -O /etc/systemd/system/docker.service
        wget https://raw.githubusercontent.com/moby/moby/27.3.1/contrib/init/systemd/docker.socket         -O /etc/systemd/system/docker.socket

leads to 404: https://raw.githubusercontent.com/moby/moby/27.3.1/contrib/init/systemd/docker.service

Looks like commit sha is not resolved and /blob is missing? Guess it should be: https://github.com/moby/moby/blob/41ca978a0a5400cc24b274137efa9f25517fcc0b/contrib/init/systemd/docker.service

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vvoland
vvoland force-pushed the docker-install-image-latest-fix branch from 946f9ec to 5898099 Compare October 30, 2024 10:37
@vvoland

vvoland commented Oct 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Oh right, that URL only worked for tags, not refs.

EDIT: The url is correct, but for some reason the gitCommit isn't set. Looking into it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

crazy-max
crazy-max reviewed Oct 30, 2024
View reviewed changes
Comment thread src/docker/install.ts Outdated
Comment on lines +145 to +146
const manifest = await moby.getPlatformManifest(tag);
const config = await moby.getConfig<ImageConfig>(manifest.config.digest);

@crazy-max crazy-max Oct 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think labels and annotations will only be on the manifest list (index) config

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vvoland vvoland Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at docker buildx imagetools inspect moby/moby-bin:latest --raw , index doesn't have these:

{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:c52ff4ad684b729f597eefacf1abc65913dcb3423071b71997cd271690c8a9b7",
      "size": 1630,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:fda20c7387897ee54811fd74b96472c4a454a62f29b5eb595caaeb4e04f01bd5",
      "size": 567,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:c52ff4ad684b729f597eefacf1abc65913dcb3423071b71997cd271690c8a9b7",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vvoland vvoland Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image config has them though:

docker buildx imagetools inspect  moby/moby-bin:latest@sha256:fe77a2f844e3db621de180b88e0e8c5439dd6802e4e6efcc5371be4a05e252d3 --raw | jq
{
  "architecture": "amd64",
  "config": {
    "Env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ],
    "WorkingDir": "/",
    "Labels": {
      "org.opencontainers.image.created": "2024-09-20T18:10:20.768Z",
      "org.opencontainers.image.description": "The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems",
      "org.opencontainers.image.licenses": "Apache-2.0",
      "org.opencontainers.image.revision": "41ca978a0a5400cc24b274137efa9f25517fcc0b",
      "org.opencontainers.image.source": "https://github.com/moby/moby",
      "org.opencontainers.image.title": "moby",
      "org.opencontainers.image.url": "https://github.com/moby/moby",
      "org.opencontainers.image.version": "27.3.1"
    }
  },

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@crazy-max crazy-max Oct 30, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vvoland
vvoland force-pushed the docker-install-image-latest-fix branch from 5898099 to 82cd3fd Compare October 30, 2024 10:49
@vvoland
vvoland marked this pull request as draft October 30, 2024 10:50
@vvoland

vvoland commented Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

Drafted for now and added some debug logs. Will undraft once fixed.

crazy-max reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vvoland
vvoland force-pushed the docker-install-image-latest-fix branch 14 times, most recently from 8c34034 to c1a54eb Compare October 30, 2024 13:54
@vvoland

vvoland commented Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

Fixed! The issues were:

  • Trying to get the config for the darwin platform (there's no Engine build for darwin)
  • Casting the application/vnd.oci.image.config.v1+json object directly to a ImageConfig struct (when it's actually Image that has the config embedded as config 🤦🏻)
crazy-max reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vvoland
vvoland marked this pull request as ready for review October 30, 2024 14:37
@vvoland
vvoland requested a review from crazy-max October 30, 2024 14:37
crazy-max
crazy-max approved these changes Oct 30, 2024
View reviewed changes

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
crazy-max
crazy-max reviewed Oct 30, 2024
View reviewed changes
Comment thread src/docker/install.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vvoland
docker/install: Fix latest image install on lima
61c10b2
`latest` is not a valid git tag or revision to get the matching systemd
unit files.
Look up the exact source git commit from the
`'org.opencontainers.image.revision` image config label.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland
vvoland force-pushed the docker-install-image-latest-fix branch from c1a54eb to 61c10b2 Compare October 30, 2024 14:45
crazy-max
crazy-max approved these changes Oct 30, 2024
View reviewed changes
@crazy-max
crazy-max merged commit 853d5fa into docker:main Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@crazy-max crazy-max crazy-max approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@vvoland @crazy-max
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.