postIt

        Post-It sticky notes with PasteBin sense

  • 04:38:16 pm on January 2, 2020 | # | 0
    Tags:

    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 build

    COPY 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 the serverhello.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

     

  • Modified from Prologue theme by Automattic

Leave a Comment