rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
5.8k stars 272 forks source link

nerdctl compose up failing #4364

Open MHacker9404 opened 1 year ago

MHacker9404 commented 1 year ago

Actual Behavior

Following docker-compose.yaml succeeds from WSL2 Debian, but RD 1.8.1/nerdctl fails: `version: '3.9' services: redis: image: 'redis'

visits: build: context: . dockerfile: Dockerfile ports:

Steps to Reproduce

docker-compose.yaml and associated source files are in the zip docker compose -f docker-compose.yaml up -d works like a charm nerdctl compose -f docker-compose.yaml up -d generates the error message

Result

INFO[0000] Creating network nerdctl-tmp1817901612_default WARN[0000] build.config should be relative path, got "/mnt/wsl/rancher-desktop/run/nerdctl-tmp.1817901612" INFO[0000] Building image nerdctl-tmp1817901612_visits FATA[0000] lstat /mnt/wsl/rancher-desktop/run/nerdctl-tmp.1817901612/Containerfile: no such file or directory FATA[0000] error while building image nerdctl-tmp1817901612_visits: exit status 1

Expected Behavior

nerdctl should be able to compose the services

Additional Information

No response

Rancher Desktop Version

1.8.1

Rancher Desktop K8s Version

1.26.3

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Windows

Operating System / Build Version

Win11 with WSL2 (latest update)

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

N/A

Windows User Only

No response

samuk190 commented 1 year ago

same issue here windows 11 22h2

Anutrix commented 1 year ago

Same issue. One thing to note: It's working for me from Powershell but not from WSL2. I think it might be something to do with how rancher handles paths.

gunamata commented 1 year ago

I am able to reproduce the issue within a WSL distro. I tried in Ubuntu-22.04. Here are my repro steps.

The command throws below error.

$ nerdctl compose -f compose.yaml up
INFO[0000] Creating network nerdctl-tmp3389984656_default
INFO[0000] Building image nerdctl-tmp3389984656_web
FATA[0000] lstat /mnt/wsl/rancher-desktop/run/nerdctl-tmp.3389984656/app/Containerfile: no such file or directory
FATA[0000] error while building image nerdctl-tmp3389984656_web: exit status 1

The same steps work in normal windows terminal cmd and powershell.

bmrobin commented 1 year ago

i'm getting this error too, a viable workaround for me was just to restart Rancher Desktop