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: Support `version: master` by vvoland · Pull Request #438 · docker/actions-toolkit

Conversation

@vvoland

@vvoland vvoland commented Sep 6, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • related to: Provide binaries using container images setup-docker-action#81

Add support for installing Docker master packages from moby/moby-bin and dockereng/cli-bin images.

This could also allow to install arbitrary version from these images but for now it's only used for master.

Test run: https://github.com/docker/moby-private/actions/runs/10773693004/job/29874033854?pr=9#step:2:336

Sorry, something went wrong.

Uh oh!

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

All reactions
@vvoland
vvoland force-pushed the install-from-binimage branch from ea3d0b7 to 91a2ddd Compare September 6, 2024 10:30
crazy-max
crazy-max reviewed Sep 6, 2024
View reviewed changes
Comment thread src/hubRepository.ts Resolved

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch 2 times, most recently from 5d3b32c to 2941b11 Compare September 6, 2024 10:40
crazy-max
crazy-max reviewed Sep 6, 2024
View reviewed changes
Comment thread src/docker/install.ts Outdated
core.info(`Downloading Docker ${this.version} from ${this.channel}`);

this._version = this.version;
if (this.version == 'master') {

@crazy-max crazy-max Sep 6, 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.

I think it would be better to rely on csv values so we can either choose archive or image format:

  • v24.0.9 similar to type=archive,version=v24.0.9
  • type=image,tag=master
  • type=image,tag=24.0.9

WDYT?

Sorry, something went wrong.

Uh oh!

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

All reactions

@crazy-max crazy-max Sep 6, 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.

But that would be smth to handle in setup-docker action as well.

Sorry, something went wrong.

Uh oh!

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

All reactions

@vvoland vvoland Sep 6, 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.

Do we want to have another input variable for cli version alone?
Like:

version: type=image,tag=master # and optional repository=moby/moby-bin-someotherepo 
cli-version: type=archive,version=v20.10.25 # if not specified, will default to tag from `version` an

or just sth like

version: |
  component=engine,type=image,tag=master
  component=cli,type=archive,version=v20.10.25

Sorry, something went wrong.

Uh oh!

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

All reactions

@vvoland vvoland Sep 6, 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.

Or, if we want to go in the direction of: docker/setup-docker-action#81

Then maybe we should have a separate image input:

    images: |
      moby/moby-bin:master
      dockereng/cli-bin:master

that would be mutually exclusive with version?

Sorry, something went wrong.

Uh oh!

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

All reactions

@crazy-max crazy-max Sep 9, 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.

Do we want to have another input variable for cli version alone?

I think we should keep both under the same terminology instead of being separated. Don't think we want to allow custom registry or image repository imo.

Or, if we want to go in the direction of: crazy-max/ghaction-setup-docker#81

I think csv values like #438 (comment) are easier to maintain so we don't introduce a new input and keep backward compat with current version input. I will update this proposal if we are ok with this. WDYT?

Sorry, something went wrong.

Uh oh!

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

All reactions

@vvoland vvoland Sep 9, 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.

My main concern here was the ability to install a different engine and cli version. I think it's fine to leave the image repository hardcoded, but it could be useful to be able to install different versions of CLI and Engine.

Sorry, something went wrong.

Uh oh!

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

All reactions

@crazy-max crazy-max Sep 9, 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.

but it could be useful to be able to install different versions of CLI and Engine.

Ok if there is this use case then what do you think of:

  • v24.0.9 > type=archive,version=v24.0.9 or type=archive,engine_version=v24.0.9,cli_version=v24.0.9 if you want specific engine/cli version

Same for images:

  • type=image,tag=24.0.9 > type=image,engine_tag=24.0.9,cli_tag=24.0.9

Sorry, something went wrong.

Uh oh!

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

All reactions

@vvoland vvoland Sep 9, 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.

SGTM, although it's not an urgent use-case so we can handle that in a follow up.

Sorry, something went wrong.

Uh oh!

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

All reactions

@vvoland vvoland Sep 9, 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.

Updated to support the CSV syntax.
Example run: https://github.com/docker/moby-private/actions/runs/10773693004/job/29874033854?pr=9#step:2:336

Sorry, something went wrong.

Uh oh!

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

All reactions
vvoland
vvoland commented Sep 9, 2024
View reviewed changes
Comment thread src/docker/install.ts Resolved

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch from 7f4cb8d to 9a7c8c8 Compare September 9, 2024 13:02
@vvoland vvoland mentioned this pull request Sep 9, 2024
Support downloading binaries from docker images docker/setup-docker-action#106
Merged
@vvoland

vvoland commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

Also opened a PR on the ghaction to make use of the new options: docker/setup-docker-action#106

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.

crazy-max
crazy-max requested changes Sep 18, 2024
View reviewed changes

@crazy-max crazy-max left a comment •
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.

Along the change for source can you add new cases in https://github.com/docker/actions-toolkit/blob/main/__tests__/docker/install.test.ts to download from image?

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/docker/install.ts Resolved

Uh oh!

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

crazy-max
crazy-max reviewed Sep 18, 2024
View reviewed changes
Comment thread src/docker/install.ts Resolved

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch 4 times, most recently from 2c74c55 to 5a0fe00 Compare October 15, 2024 19:53
@crazy-max

crazy-max commented Oct 16, 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/11353388604/job/31578295350?pr=438#step:11:583

Downloading from moby/moby-bin and dockereng/cli-bin tag: 27.3.1
FAIL __tests__/docker/install.test.itg.ts (355.416 s)
  ● install › install docker { type: 'image', tag: '27.3.1' }

    expect(received).resolves.not.toThrow()

    Received promise rejected instead of resolved
    Rejected to value: [Error: Cannot find manifest for darwin/amd64/]

Hum right, on macos runners it will use darwin looking at https://github.com/docker/actions-toolkit/pull/438/files#diff-0f2ffb1716f62956ee604fae748f3369d867fa5c39a60388479728f013479b46R120. Might need to enforce linux in this case but not for cli.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch from 5a0fe00 to 97bef8d Compare October 16, 2024 07:45
@vvoland

vvoland commented Oct 16, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Or just skip the daemon on darwin and only download the CLI?

OTOH, this could be confusing behavior as it will not error out and won't be able to connect to the daemon..

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch from 97bef8d to 20a30f2 Compare October 16, 2024 07:49
@crazy-max

crazy-max commented Oct 16, 2024

Copy link
Copy Markdown
Member

Or just skip the daemon on darwin and only download the CLI?

OTOH, this could be confusing behavior as it will not error out and won't be able to connect to the daemon..

Yeah provisioning for macos is a bit different. It downloads static bins from download.docker.com: https://github.com/docker/actions-toolkit/actions/runs/11289888751/job/31400662984#step:11:17 which only contains cli as expected.

But then during lima provisioning it installs the engine using get.docker.com script:

actions-toolkit/src/docker/assets.ts

Line 224 in a59a5f8

curl -fsSL https://get.docker.com | sh -s -- --channel {{dockerBinChannel}} --version {{dockerBinVersion}}
so platform normalization would match the VM.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland

vvoland commented Oct 16, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Right, so we'd need to also handle the image download inside the lima provisioning script. I think it's easiest to just use undock there? The lima provisioning is already doing a lot of stuff, so the extra binary won't hurt there 😅

EDIT: Actually it might be easier to just mount the binaries to lima vm, let me try that.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch 8 times, most recently from 9662b9d to 23c945d Compare October 16, 2024 10:32
@crazy-max

crazy-max commented Oct 16, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Can you rebase to fix the QEMU issue related to #459

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
docker/install: Add tests for installing from image
b143889
Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland
vvoland force-pushed the install-from-binimage branch from 81d3249 to 668161b Compare October 17, 2024 10:18
@vvoland

vvoland commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

Weird qemu failure:

[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[    0.000000] APIC: Switch to symmetric I/O mode setup
[    0.000000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.000000] ..MP-BIOS bug: 8254 timer not connected to IO-APIC
[    0.000000] ...trying to set up timer (IRQ0) through the 8259A ...
[    0.000000] ..... (found apic 0 pin 2) ...
[    0.016000] ....... failed.
[    0.016000] ...trying to set up timer as Virtual Wire IRQ...
[    0.032000] ..... failed.
[    0.032000] ...trying to set up timer as ExtINT IRQ...
[    0.044000] ..... failed :(.
[    0.044000] Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  Then try booting with the 'noapic' option.

Is this known to happen sometimes? 🤔

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland

vvoland commented Oct 17, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

The previous failure on macos-12 was related to the long /var/tmp path - it didn't mount correctly into lima vm.
Fixed by copying to a shorter path in .lima directory.

EDIT: Looks like it's still the case 🫠

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
vvoland force-pushed the install-from-binimage branch 17 times, most recently from 58cfeb4 to 396c98a Compare October 18, 2024 12:55
@vvoland
Support image source on darwin
e3d0e4e
Use undock inside lima to pull the image content.
We could mount the downloaded binaries from the host, but for some
reason lima mounts are not always mounted when the provisioning script
is run.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland
vvoland force-pushed the install-from-binimage branch from 396c98a to e3d0e4e Compare October 18, 2024 12:57
@vvoland

vvoland commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

Ok, looks like lima mounts are not always mounted before the provisioning script is run.
I changed the darwin lima install to pull the binaries with undock instead.
Should be good to go!

All reactions

Sorry, something went wrong.

Uh oh!

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

@vvoland
vvoland requested a review from crazy-max October 18, 2024 13:16
crazy-max
crazy-max approved these changes Oct 27, 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.

Ok, looks like lima mounts are not always mounted before the provisioning script is run.

Argh I will take a look if we can fix that as follow-up so we can just use undock in docker install and avoid hub requests.

But let's get this in in the meantime!

Sorry, something went wrong.

Uh oh!

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

All reactions
@crazy-max
crazy-max merged commit 517a5c5 into docker:main Oct 27, 2024
@crazy-max crazy-max mentioned this pull request Oct 28, 2024
undock install #473
Merged
@crazy-max crazy-max mentioned this pull request Dec 6, 2024
Provide binaries using container images docker/setup-docker-action#81
Closed
@crazy-max crazy-max mentioned this pull request Jan 19, 2025
docker(install): use undock to extract image #567
Merged
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.