cannot complete docker build of a c program

Viewed 17

I am using the gcc image from hub.docker.com here

I am under windows 11, so I need to conver the docker run commad to windows, either cmd or preferably powrshel

linux command to convert

docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp gcc:4.9 gcc -o hello hello.c

what I use in windows

docker run --rm -v /G/Docker/00100_start -w /G/Docker/00100_start/ gcc:4.9 gcc -o hello hello.c

I get this error message

gcc: error: hello.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.

What am I doing wrong?

Should I use another way?

0 Answers
Related