Arif
-
04:38:16 pm on January 2, 2020 | # |
When put at the root of my Windows user folder
C:\Users\[my username]\Dockerfile
it will fail to find context of related files required in the buildCOPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder746762051/nodejs/package.json: no such file or directory
Hence, in separate sub-directory:
<docker Windows User root> | nodejs (dir) |___ Dockerfile .dockerignore resources (dir) |____packages.json serverhello.js
COPY success during build:
cd nodejs docker build -t bandono/simplenodeweb .
Instead of
-d
that exited with code 126 the whole time, run theserverhello.js
using:$ docker run -p 8286:8080 bandono/simplenodeweb node serverhello.js Running on http://0.0.0.0:8080
References (which not working at first running with
-d
):[1] nodejs org
[2] DigitalOcean