devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
945 stars 386 forks source link

Installting "docker in docker" and "docker outside of docker" with moby 26.1.5/26.1.4/24.0.9 on linux/amd64 fails at postinstall script #1205

Open hellt opened 5 days ago

hellt commented 5 days ago

Description

when installing moby 26.1.5 via devcontainer feature defined like this:

"features": {
        "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
            "version": "26.1.5",
            "dockerDashComposeVersion": "none"
        },

I get the following in the installation log

 [2024-11-28T17:57:04.286Z] #51 23.16 Get:2 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm/main arm64 moby-cli arm64 26.1.5-debian12u1 [15.9 MB]

[2024-11-28T17:57:13.297Z] #51 32.05 Setting up moby-cli (26.1.5-debian12u1) ...
  #51 32.06 Error while loading /var/lib/dpkg/info/moby-cli.postinst: Exec format error
  #51 32.06 dpkg: error processing package moby-cli (--configure):
  #51 32.06  installed moby-cli package post-installation script subprocess returned error exit status 1

Is this is a MSFT packaging problem?

hellt commented 5 days ago

tested 26.1.5, 26.1.4 and 24.0.9. All fail when running in gh actions with linux/amd64 emulated platform

hellt commented 4 days ago

The root cause seems to be in the incompatible (?) postinstall script that does not handle the --configure argument.

More details here https://github.com/moby/moby/issues/48987#issuecomment-2507267417