Windows 10 machine running Docker Desktop via WSL2…
Using Cmder shell tool for Windows.
TL;DR:
Running these docker commands all fail to detect the source code change.
Creating a new container does show the change from the previous attempt.
But none of the following attempts showed changes while the container was running.
Attempt #1:
docker run -d -p 5001:3000 --name wind-sock -v ${pwd}:/app react-app
Result #1:
docker: Error response from daemon: create ${pwd}: “${pwd}” includes invalid characters for a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed. If you intended to pass a host directory, use absolute path.
Attempt #2:
docker run -d -p 5001:3000 --name wind-sock -v ${PWD}:/app react-app
Result #2:
docker: Error response from daemon: create ${PWD}: “${PWD}” includes invalid characters for a local volume name, only “[a-zA-Z0-9][a-zA-Z0-9_.-]” are allowed. If you intended to pass a host directory, use absolute path.
Attempt #3:
docker run -d -p 5001:3000 --name wind-sock -v “%cd%”:/app react-app
Result #3:
The container created successfully. However, when you make a change to react-app/public/index.html – nothing happens.
Attempt #4:
docker run -d -p 5001:3000 --name wind-sock -v //c/x-apps/docker-work/react-app:/app react-app
Result #4:
The container created successfully. However, when you make a change to react-app/public/index.html – again, nothing happens.
Attempt #5:
docker run -d -p 5001:3000 --name wind-sock -v c:\x-apps\docker-work\react-app:/app react-app
Result #5:
The container created successfully. However, when you make a change to react-app/public/index.html – yet again, nothing happens.
Any thoughts?
Cheers,
Kyle