Error whenever I try to run a vite web project docker container with volume

So I’m trying to run a web project in a container in a way I can edit it in real time with volumes as I’ve seen in the video class I was watching, but although it runs fine if I don’t use volumes, when I use volumes it breaks with the following error in runtime:

/app/node_modules/rollup/dist/native.js:59
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-linux-x64-musl. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/app/node_modules/rollup/dist/native.js:68:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at cjsLoader (node:internal/modules/esm/translators:366:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-musl'
  Require stack:
  - /app/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
      at Module._load (node:internal/modules/cjs/loader:984:27)
      at Module.require (node:internal/modules/cjs/loader:1231:19)
      at require (node:internal/modules/helpers:179:18)
      at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:41:10)
      at Object.<anonymous> (/app/node_modules/rollup/dist/native.js:68:76)
      at Module._compile (node:internal/modules/cjs/loader:1369:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
      at Module.load (node:internal/modules/cjs/loader:1206:32)
      at Module._load (node:internal/modules/cjs/loader:1022:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/app/node_modules/rollup/dist/native.js' ]
  }
}

Node.js v20.12.2
npm notice
npm notice New minor version of npm available! 10.5.0 -> 10.8.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.8.0>
npm notice Run `npm install -g npm@10.8.0` to update!
npm notice

I use Windows 11 and Bash as a terminal. The code I run is the following

docker run -p 5173:5173 -v /$(pwd):/app react-docker

Although I followed the same steps as in the video, it simply won’t work here. Why is this error happening and how can I fix it?

That seems wrong, use $(pwd).

Just seems, because if I only do $(pwd) it doesn’t link the host and container folders properly, so it simply doesn’t work if I do it that way.

$(pwd) should deliver a full path, so adding more characters usually does not make sense.

Use docker inspect <c-id> to see what the values are for the (running) container.

This is what I get from the inspection when running with -v $(pwd):/app.

[
    {
        "Id": "2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559",
        "Created": "2024-05-25T23:14:50.172411606Z",
        "Path": "docker-entrypoint.sh",
        "Args": [
            "/bin/sh",
            "-c",
            "npm run dev"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 357,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-05-25T23:14:52.746124718Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:afc0fbd9a1c3298caed770d9444483bb3ff1c82f4b8cd2233f395aea1c72d108",
        "ResolvConfPath": "/var/lib/docker/containers/2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559/hostname",
        "HostsPath": "/var/lib/docker/containers/2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559/hosts",
        "LogPath": "/var/lib/docker/containers/2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559/2d0f471874dcf17d04d913a74f1ec4d4f9cd5a20631cf642c8878bae967bd559-json.log",
        "Name": "/affectionate_kalam",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "C:\\Users\\bruno\\projetos\\docker\\docker-course\\class2\\react-docker;C:\\Program Files\\Git\\app"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "bridge",
            "PortBindings": {
                "5173/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5173"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                30,
                120
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c2461e4c1062b66c80d2e008e8ea7534f8e362f81623ba002b4c1dfb19e6075a-init/diff:/var/lib/docker/overlay2/ykhkvqmc1fqo0pjja3nxz1q8j/diff:/var/lib/docker/overlay2/vb61d1m0826f4d1rfhcjlnwvb/diff:/var/lib/docker/overlay2/vn1b8lwsf46lq30766dtsx4x0/diff:/var/lib/docker/overlay2/n80ktmi8wwnp075wrjvh1c5cn/diff:/var/lib/docker/overlay2/x4o32uhw809cwaozbz3na71db/diff:/var/lib/docker/overlay2/1ab6hrpdw0tqz6cp1ekxqd3dt/diff:/var/lib/docker/overlay2/e71dbcf792e9e52be35ee00826be0161cee6854d2989f360c381d20e57cbd8f3/diff:/var/lib/docker/overlay2/e6b28ce0bf078416592db1a1d980d8a2d35ae524bcce549136023f64195780bf/diff:/var/lib/docker/overlay2/1c9546ce67be4333120c5e086ed03d9520ebef219c4959b841b9519dfe5b7514/diff:/var/lib/docker/overlay2/9238bf0a1fb29b0a729ee36d3198f4883539448a9688c8c7545992fe6acf7c68/diff",
                "MergedDir": "/var/lib/docker/overlay2/c2461e4c1062b66c80d2e008e8ea7534f8e362f81623ba002b4c1dfb19e6075a/merged",
                "UpperDir": "/var/lib/docker/overlay2/c2461e4c1062b66c80d2e008e8ea7534f8e362f81623ba002b4c1dfb19e6075a/diff",
                "WorkDir": "/var/lib/docker/overlay2/c2461e4c1062b66c80d2e008e8ea7534f8e362f81623ba002b4c1dfb19e6075a/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "C:\\Users\\bruno\\projetos\\docker\\docker-course\\class2\\react-docker;C",
                "Destination": "\\Program Files\\Git\\app",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "2d0f471874dc",
            "Domainname": "",
            "User": "app",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "5173/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=20.12.2",
                "YARN_VERSION=1.22.19"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "npm run dev"
            ],
            "Image": "react-docker",
            "Volumes": null,
            "WorkingDir": "/app",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "8a55a15d5099132f26b0e8327268cb80dbd4223a539a81360dcea598177b0281",
            "SandboxKey": "/var/run/docker/netns/8a55a15d5099",
            "Ports": {
                "5173/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5173"
                    }
                ]
            },
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "05bb93e219555a7589a84dfcb352f1607140c65a5fe56fdd18a5c5b597402018",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "MacAddress": "02:42:ac:11:00:02",
                    "NetworkID": "8834c3eaa26b35e8a08de2a9dad0d4da9057e8bdfa83dcbe0e2b5c278a09b2cf",
                    "EndpointID": "05bb93e219555a7589a84dfcb352f1607140c65a5fe56fdd18a5c5b597402018",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DriverOpts": null,
                    "DNSNames": null
                }
            }
        }
    }
]

How do you run your Linux containers on Windows? With Docker Desktop or WSL?

A bind mount into a Linux container with a Windows path will probably never work:

Docker Desktop.

A bind mount into a Linux container with a Windows path will probably never work:

So I’m bound to use Docker only with Linux or at most using WSL? I though the idea of containers were to work in any environment without problems…

That is a good idea in a fairy tale or from a marketing guy :slight_smile: Unfortunately this is indeed what many people say so I’m not surprised other users start to believe it. There is no such thing as “any environment without problems”. And we are not talking about containers here, but virtual machines, and containers in containers in containers… That is what Docker Desktop for Windows with the WSL2 backend is basically.

Docker Desktop for Windows allows you to run Windows containers but you are running linux containers.

I also have a feeling when you wrote this:

You meant Git Bash, not a WSL2 distribution. I think that because of

which could be the result of trying to run $(pwd) in git bash. That would explain why it didn’t work without the leading slash, but by adding it, you just made it syntactically correct, but not semantically.

I guess $(pwd) returned

C:\\Program Files\\Git

in Git Bash. Then you basically tried:

-v C:\\Program Files\\Git:/app

in a Git Bash, so C was interpreted as the source named volume, and \\Program Files\\Git as destination, and /app as mode which was invalid. Then you added the leading slash

-v /C:\\Program Files\\Git:/app

So /C is not a named volume anymore. I have no idea how Git Bash interprets these paths, but apparently, / was converted to

C:\\Users\\bruno\\projetos\\docker\\docker-course\\class2\\react-docker;

maybe not by Git Bash, because then the C: would have caused the same issue.

Honestly, I’m just guessing, but as @bluepuma77 wrote, / is not necessary before $(pwd) and as I tried to point out, the fact that something is supported on multiple platforms, doesn’t mean it can work exactly the same way. Only almost the same way and some of the differences are even mentioned in the documentation.

If you want to run Windows containers, switch to Windows containers in the menu of Docker Desktop. You can find it in the notification area too. Note that windows containers means the operating system inside the container is Windows so your application has to be written to run on Windows.

2 Likes

That’s right, I use git bash terminal on Windows. Thanks for the clarification, I may finally fix the many problems I have been having with Docker. Just two last questions:

  1. Does it mean I either need to change the container to a windows container, or use WSL to be able to use containers as is in a Windows OS?
  2. What’s the best practice here? I suppose I should use WSL to use linux containers and avoid using windows containers, but I just want to be sure of it.

The question is what you want as a result. Application running on Linux, or application runing on Windows. If you already have a base image that supports only Linux, it is not even a question. Windows containers are very different, so most of us use Linux containers. You can esily run a Linux container in a VM on Windows, but running a Windows container in a VM on a Linux host is probably not as obvious. You have your needs and you choose a way for that. If you create a Docker image for Linux, you can share it with much more people, but running something in a Linux container wouldn’t make sense if it has much better support on Windows or you are much better at dealing with Windows applications than Linux, unless the end users need to run it on Linux.

If you need Linux container on Windows, you need a VM. If you want to use Docker Desktop for development (not for running containers in production on a server), then you can choose the WSL2 backend (recommended) or the HyperV backend. I will probably not know when HyperV is not supported anymore (if it ever happens) because I installed it once with the WSL2 backend and don’t really had to reinstall it since.

I don’t recommend using Git Bash fo the Docker client. It is better to enable the WSL2 intergation in a WSL2 distribution and run the Docker commands from there. That will still be a remote access to the docker daemon (from one WSL distro to another), but you will have a real bash shell

1 Like

Ok, I just tried to run this container from a WSL and funnily enough, I get the exact same error I posted above when trying to run from the git bash terminal with a slash(/) although I didn’t use it in the WSL. I’m really thinking of just giving up on learning Docker at this point. This thing simply doesn’t want to work at all.

If by any chance this have any utility, here is the docker inspect of trying to run this container from a WSL.

[
    {
        "Id": "5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0",
        "Created": "2024-05-27T19:10:15.173143902Z",
        "Path": "docker-entrypoint.sh",
        "Args": [
            "/bin/sh",
            "-c",
            "npm run dev"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2024-05-27T19:10:17.48101959Z",
            "FinishedAt": "2024-05-27T19:10:19.925685517Z"
        },
        "Image": "sha256:cd327c90b85e0c43b9659c2bf91527a99e065c06d090ae041267c182709d85e7",
        "ResolvConfPath": "/var/lib/docker/containers/5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0/hostname",
        "HostsPath": "/var/lib/docker/containers/5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0/hosts",
        "LogPath": "/var/lib/docker/containers/5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0/5872b5b310ca46cc0e6e5f98f2741b576eb2c595e3ea056fcd5ce1ed990eb1d0-json.log",
        "Name": "/bold_hopper",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/94dc6354298cedafb0cdf4c4e12d8a460d578f40a0fce3f28c949b9facb51e82:/app"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "bridge",
            "PortBindings": {
                "5173/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5173"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                30,
                120
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/6ac6c8036a049434e2afbcbf5ac49e30fb60bec5b623b6132fb634f6dfb5ee5c-init/diff:/var/lib/docker/overlay2/nytn1orauumz6bpdr62ntf20v/diff:/var/lib/docker/overlay2/k5eayz1a81xec0fpxn23d2ta9/diff:/var/lib/docker/overlay2/7lj0ecgo33rk4s40fdhr5b6y2/diff:/var/lib/docker/overlay2/16uzlem3w6gly49zhzsafgdnq/diff:/var/lib/docker/overlay2/tvz1u6ztyr4y95gvvkcb9q6ot/diff:/var/lib/docker/overlay2/irav4dqorjjltx2znr2o10gjz/diff:/var/lib/docker/overlay2/5639ae1c0f46023ce53911604ec8945d430426648261d70e7adb9ff0c43ee5a0/diff:/var/lib/docker/overlay2/49474bf986f684957082e806149c87cb950d709718eac6654ed95152c481a811/diff:/var/lib/docker/overlay2/e52884cbdfcbadee1fe090a68442d693bab51ca1b491c5369e25f1145ba3ae3a/diff:/var/lib/docker/overlay2/20ab175427d58f564e13fdd399f06c2d8de575a7060cef8c86e31f85f93eedb6/diff",
                "MergedDir": "/var/lib/docker/overlay2/6ac6c8036a049434e2afbcbf5ac49e30fb60bec5b623b6132fb634f6dfb5ee5c/merged",
                "UpperDir": "/var/lib/docker/overlay2/6ac6c8036a049434e2afbcbf5ac49e30fb60bec5b623b6132fb634f6dfb5ee5c/diff",
                "WorkDir": "/var/lib/docker/overlay2/6ac6c8036a049434e2afbcbf5ac49e30fb60bec5b623b6132fb634f6dfb5ee5c/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/94dc6354298cedafb0cdf4c4e12d8a460d578f40a0fce3f28c949b9facb51e82",
                "Destination": "/app",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "5872b5b310ca",
            "Domainname": "",
            "User": "app",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "5173/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=20.13.1",
                "YARN_VERSION=1.22.19"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "npm run dev"
            ],
            "Image": "react-docker",
            "Volumes": null,
            "WorkingDir": "/app",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "desktop.docker.io/wsl-distro": "Ubuntu"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "1e6b01475fb3b52930975dae6e147e00356bb24af1662e36437ce9728931556a",
            "SandboxKey": "/var/run/docker/netns/1e6b01475fb3",
            "Ports": {},
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "MacAddress": "",
                    "NetworkID": "4bf37b1bc08ee963c3ddbcc5cfc9f3a1eca37fd63e59fa09a47e8aa35248f2c8",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DriverOpts": null,
                    "DNSNames": null
                }
            }
        }
    }
]

If by the exact same error you mean the Nodejs error, you could try something simpler intsead of building and running a NodeJS app. Examples and tutorials/codes are sometimes wrong. We haven’t really seen a Docker error yet. And you are not really learning only Docker at this moment, but Docker Desktop, which is not the same thing and more likely fail sometimes. On the other hand, Docker Desktop has features which you would not have otherwise, but if you don’t need that and you can install Docker CE in a Linux virtual machine, it is less likely to fail unless a tutorial depends on a fetaure available only in Docker Desktop. The virtual machine can be WSL2 as well without Docker Desktop, but WSL2 is still a special environment so there are some things you would probably need to change like the default IP address pool of Docker. If you only want to use Docker for development and never in production, Docker Desktop could seem better, but if you want it to work in production, you would need to learn how it works on a more standard Linux environment.

If you want to learn Docker, you can also start with my tutorial which I tested on Linux with Docker CE and on macOS with Docker Desktop, but I think I haven’t tested it on Windows. I usually share the below template for learning the basics.

Recommended links to learn the basics and concepts:

The last link is (currently) about Docker Desktop which is Docker CE in a virtual machine whith a GUI.

So essentially there’s no solution to my problem… Well, guess I gotta give up then, at least for now. Thanks for the support and patience in answering my questions.