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

[docker-in-docker] version is not respected when moby is set to false #1202

Open
hellt opened this issue Nov 27, 2024 · 2 comments
Open

[docker-in-docker] version is not respected when moby is set to false #1202

hellt opened this issue Nov 27, 2024 · 2 comments

Comments

@hellt
Copy link

hellt commented Nov 27, 2024

Hi,
I am trying to build a d-in-d devcontainer in a multiarch setting (linux/amd64 and linux/arm64).

When I added the arm64 platform to the action the build process failed with an error that moby package does not exist in the package repository (I pinned the moby version to 26.1.4).

I then set moby:false in my devcontainer inputs, but then the version is not respected at all:

#37 /bin/sh -c cp -ar /tmp/build-features-src/docker-in-docker_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/docker-in-docker_0  && cd /tmp/dev-container-features/docker-in-docker_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/docker-in-docker_0
  #37 0.062 ===========================================================================
  #37 0.062 Feature       : Docker (Docker-in-Docker)
  #37 0.062 Description   : Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.
  #37 0.062 Id            : ghcr.io/devcontainers/features/docker-in-docker
  #37 0.062 Version       : 2.12.0
  #37 0.062 Documentation : https://github.com/devcontainers/features/tree/main/src/docker-in-docker
  #37 0.062 Options       :
  #37 0.062     VERSION="26.1.4"
  #37 0.062     MOBY="false"
  #37 0.062     MOBYBUILDXVERSION="latest"
  #37 0.062     DOCKERDASHCOMPOSEVERSION="none"
  #37 0.062     AZUREDNSAUTODETECTION="true"
  #37 0.062     DOCKERDEFAULTADDRESSPOOL=""
  #37 0.062     INSTALLDOCKERBUILDX="true"
  #37 0.062     INSTALLDOCKERCOMPOSESWITCH="true"
  #37 0.062     DISABLEIP6TABLES="false"
  #37 0.062 ===========================================================================
  #37 0.074 Distro codename  'bookworm'  matched filter  'bookworm buster bullseye bionic focal hirsute impish jammy noble'

  #37 6.771 The following NEW packages will be installed:
  #37 6.771   containerd.io docker-ce docker-ce-cli

It appears to be that the correct version of docker-ce and docker-ce-cli is installed first, but then it is installed all over again with the latest version.

Here is a full build log.

Appreciate any help on this

@hellt
Copy link
Author

hellt commented Nov 29, 2024

I think the problem stems from the fact that docker-compose-plugin is implicitly installed and this causes docker-ce and docker-ce-cli to automatically upgrade to the latest, violating the selected version

apt-get -y install --no-install-recommends docker-compose-plugin || echo "(*) Package docker-compose-plugin (Docker Compose v2) not available for OS ${ID} ${VERSION_CODENAME} (${architecture}). Skipping."

The docker-compose-version should respect the selected version

would appreciate any comments on how to fix that

/cc @samruddhikhandale

@gauravsaini04
Copy link
Contributor

hi @hellt
Thanks for raising this
Apologize for a late reply for your raised query
Have corrected the scenario mentioned by pinning the docker-ce and docker-ce-cli versions and have raised a pr (#1215) for the same

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

No branches or pull requests

2 participants