python-docker-tutorial
python-docker-tutorial copied to clipboard
docker: invalid reference format. $(pwd) in command: docker run --name fastapi-container -p 80:80 -d -v $(pwd):/code fastapi-image
This is for someone who is experiencing a similar error on a Windows operating system.
I follow all the tutorial and for me (Machine with Windows 11 PRO, Docker desktop), the command:
docker run --name fastapi-container -p 80:80 -d -v $(pwd):/code fastapi-image
give me the next error:
docker: invalid reference format.
I change the command to
### docker run --name fastapi-container -p 80:80 -d -v ${pwd}:/code fastapi-image
And run ok