spurin / diveintokubernetes

Dive Into Kubernetes - Getting Started with Containers, Docker and Kubernetes
137 stars 27 forks source link

install extention occur exception #8

Open shifengbin opened 3 days ago

shifengbin commented 3 days ago

os: windows11 arch: amd64

log: Image not available locally, pulling spurin/diveintokubernetes-introduction-lab-extension... Extracting metadata and files for the extension "spurin/diveintokubernetes-introduction-lab-extension" Installing service in Desktop VM... Setting additional compose attributes Installing Desktop extension UI for tab "Dive Into Kubernetes"... Extension UI tab "Dive Into Kubernetes" added. Starting service in Desktop VM...... failed when running compose up for extension spurin/diveintokubernetes-introduction-lab-extension: executing 'C:\Program Files\Docker\Docker\resources\bin\docker --context desktop-linux compose -p spurin_diveintokubernetes-introduction-lab-extension-desktop-extension -f C:\Users\xxx\AppData\Roaming\Docker\extensions\spurin_diveintokubernetes-introduction-lab-extension\vm\docker-compose.yaml up -d' : exit status 15: services.portal.depends_on.control-plane Additional property required is not allowed executing 'C:\Program Files\Docker\Docker\resources\bin\docker --context desktop-linux compose -p spurin_diveintokubernetes-introduction-lab-extension-desktop-extension -f C:\Users\xxx\AppData\Roaming\Docker\extensions\spurin_diveintokubernetes-introduction-lab-extension\vm\docker-compose.yaml up -d' : exit status 15: services.portal.depends_on.control-plane Additional property required is not allowed Removing extension spurin/diveintokubernetes-introduction-lab-extension... Removing extension containers... Extension containers removed Extension UI tab Dive Into Kubernetes removed Extension image spurin/diveintokubernetes-introduction-lab-extension removed Extension "Dive Into Kubernetes" removed installation could not be completed due to: executing 'C:\Program Files\Docker\Docker\resources\bin\docker --context desktop-linux compose -p spurin_diveintokubernetes-introduction-lab-extension-desktop-extension -f C:\Users\xxx\AppData\Roaming\Docker\extensions\spurin_diveintokubernetes-introduction-lab-extension\vm\docker-compose.yaml up -d' : exit status 15: services.portal.depends_on.control-plane Additional property required is not allowed

spurin commented 3 days ago

Thanks @shifengbin

What happens if you remove the extension and retry installation, do you get the same problem.

Can you please confirm the version of Docker Desktop that you're using, also, the version of windows (windows r, winver)

shifengbin commented 2 days ago

@spurin Thank you for replying I am utilizing Docker Desktop version 4.34.3 (170107) in conjunction with Windows 11 23H2. I have attempted to reboot the operating system and restart Docker; however, this has proven ineffective. I am unable to remove the extension as it has not been installed successfully.

spurin commented 2 days ago

Thanks @shifengbin

I'll recreate this in my environment and will check today, in the interim, please make use of the google cloud shell version 👍

spurin commented 2 days ago

@shifengbin could you please try removing Docker Desktop, and installing 4.33

I think, looking through this error that they may have updated compose internally and possibly, it's introduced this issue: https://github.com/docker/compose/issues/10804

I will check it but going back one version might be a quick fix here.

shifengbin commented 2 days ago

@spurin All right, I shall make an attempt. Thank you.

spurin commented 2 days ago

Hi @shifengbin,

I just tried this on a new install of Docker Desktop 4.34.3, my Windows 11 is23H2 2261.4317 and is all is completely fine. I'm a bit stuck as to why this is an issue for you.

Please let me know what you get as the following -

docker compose version
docker version
shifengbin commented 2 days ago

Docker Compose version v2.16.0

Client: Version: 27.2.0 API version: 1.47 Go version: go1.21.13 Git commit: 3ab4256 Built: Tue Aug 27 14:17:17 2024 OS/Arch: windows/amd64 Context: desktop-linux

Server: Docker Desktop 4.34.3 (170107) Engine: Version: 27.2.0 API version: 1.47 (minimum version 1.24) Go version: go1.21.13 Git commit: 3ab5c7d Built: Tue Aug 27 14:15:15 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.20 GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0

spurin commented 2 days ago

Interesting, I don't know why but our compose versions are significantly different. When I run

docker compose version (or docker-compose version)

I get v2.29.2-desktop.2 which corresponds roughly to the time period of 4.34.3, you however, get v2.16.0 which is from February 2023.

The rest of the output matches. Something isn't correct with your docker installation and/or, it's picking up an old version of docker-compose from somewhere. Typically, docker-compose is installed as a binary in C:\Program Files\Docker\cli-plugins and in windows, any of these docker- binaries become docker commands. For example

docker compose

Would run C:\Program Files\Docker\cli-plugins\docker-compose

I think, if we can fix your docker installation then all will be well. Please try removing Docker fully, making sure there's no rogue docker-compose.exe binaries hanging around and then re-install.

When you run docker compose version, it should say v2.29.2-desktop.2 for the current version of 4.34.3.

Hope this helps! Please let me know how you get on.