question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nerdctl WSL linux bind mount not working in docker-compose

See original GitHub issue

Rancher Desktop Version

Version: 1.0.0-beta.1

Rancher Desktop K8s Version

1.22.5

What operating system are you using?

Other (specify below)

Operating System / Build Version

Windows 10 Pro, WSL2 debian

What CPU architecture are you using?

x64

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

No response

Windows User Only

No response

Actual Behavior

My volume bind mounts in the docker-compose are ignored and cause the app to crash.

Steps to Reproduce

  1. create the following file structure:
- docker-compose.yml
- myapp/
- - volume/
  1. The docker-compose should look like this:
version: "3.9"
services:
  frontend:
    image: node:lts
    volumes:
      - ./myapp/volume:/home/node/app
  1. run nerdctl compose -f ./docker-compose.yml up --build

Result

I get the following output:

image

Expected Behavior

This should successfully run and build a container.

Additional Information

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
janduboiscommented, Feb 2, 2022

@maybeec The docker-compose integration will be included in the 1.1.0 release; for now you have to install it manually.

0reactions
jotahecommented, Mar 10, 2022

Hi @evertonlperes and everyone, I got the same error you mentioned:

 nerdctl compose -f ./nerdctlexa.yml up --build
INFO[0000] Creating network nerdctl-tmp.3466118414_default 
INFO[0000] Building image nerdctl-tmp.3466118414_web    
[+] Building 0.0s (0/0)
error: could not find /mnt/wsl/rancher-desktop/run/nerdctl-tmp.3466118414/web/build: stat /mnt/wsl/rancher-desktop/run/nerdctl-tmp.3466118414/web/build: no
 such file or directory
FATA[0000] unrecognized image format
FATA[0000] error while building image nerdctl-tmp.3466118414_web: exit status 1

Seems that is always looking for a path related to rancher mount directory. This is the docker compose i am trying to run:

version: '3.9'
services:
  web:
    build:
      context: ./web/build/
      dockerfile: Dockerfile-alpine
      args:
        environment: dev
        status: stable
    ports:
        - 80:80
Read more comments on GitHub >

github_iconTop Results From Across the Web

Get the error when run "compose up" with nerdctl
I do not know if it is a problem related create a volume in docker-compose.yaml in a system with WSL, if it is...
Read more >
Docker WSL2 : error mounting -docker compose
Hello, I am trying to get openrouteservice to run on my local machine. I am using WSL2 and I run everything on my...
Read more >
Docker compose volume syntax valid for Windows and Linux
Yes. Just use ./ for you current directory that the Docker-compose file is in. Your "working directory" for the compose file is just...
Read more >
Customize the Docker extension - Visual Studio Code
json creates and starts Docker containers using the Docker Compose command line (CLI). The task can be used by itself, or as part...
Read more >
Should We Replace Docker Desktop With Rancher Desktop?
In my opinion, it completely solves the issues for volume mounts on the ... nerdctl (Docker compatible-ish cli), and Helm in both WSL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found