podsheets icon indicating copy to clipboard operation
podsheets copied to clipboard

Docker build is failing

Open ashishb opened this issue 3 years ago • 5 comments

$ docker build -t podsheet .
Sending build context to Docker daemon  105.9MB
Step 1/11 : from kkarczmarczyk/node-yarn:8.0 as jsBuilder
 ---> 3517e5e04f69
Step 2/11 : ADD . /src
 ---> Using cache
 ---> 0d42003e89cf
Step 3/11 : WORKDIR /src
 ---> Using cache
 ---> 01f09b9efdff
Step 4/11 : RUN yarn install
 ---> Using cache
 ---> 1b3ebd850829
Step 5/11 : RUN yarn build
 ---> Using cache
 ---> cc0a2b04bc05
Step 6/11 : from node:8-jessie
 ---> 0f8964092ab1
Step 7/11 : COPY --from=jsBuilder /src/server/build /app
 ---> Using cache
 ---> 3206dcdbb406
Step 8/11 : COPY --from=jsBuilder /src/server/node_modules /app/node_modules
 ---> Using cache
 ---> 8e14f1ad1a8e
Step 9/11 : COPY --from=jsBuilder /src/server/src/public /app/public
COPY failed: stat /var/lib/docker/overlay2/7181719826f4aded2b7c3d0b8febd4f45978c0bf97eb9a6aaff16b80d2069c41/merged/src/server/src/public: no such file or directory

ashishb avatar Jul 07 '20 05:07 ashishb

i have the same issue someone can help ?

Nesslax avatar Jan 02 '21 23:01 Nesslax

There is a typo in the Dockerfile on line 11 it seems. You will be able to get around this problem by changing it to COPY --from=jsBuilder /src/server/public /app/public

k3t3v avatar Jan 15 '21 12:01 k3t3v

@k3t3v Thanks. That worked.

However, the next step still fails due to lack of env vars. I wish some default values would have worked to test this project :/

$ docker-compose up
ERROR: Couldn't find env file: /private/tmp/podsheets/server/.env

ashishb avatar Jan 15 '21 22:01 ashishb

@k3t3v Thanks. That worked.

However, the next step still fails due to lack of env vars. I wish some default values would have worked to test this project :/

$ docker-compose up
ERROR: Couldn't find env file: /private/tmp/podsheets/server/.env

You should follow projet description here is what you shoudl do :

Copy the file ./server/.env.sample to ./server/.env and edit the file with your credentials: cp ./server/.env.sample ./server/.env

Nesslax avatar Jan 15 '21 22:01 Nesslax

You should follow projet description here is what you shoudl do :

Copy the file ./server/.env.sample to ./server/.env and edit the file with your credentials: cp ./server/.env.sample ./server/.env

That's right @Nesslax. Thanks for that.

I've just started looking into this codebase last night. There are a few issues with the build and I'll try to submit a pull request today once I've gone through all the relevant documentation on the project and set it up properly.

I noticed another typo in the Dockerfile in the last line. I believe it should be: CMD node ./src/index.js

k3t3v avatar Jan 15 '21 23:01 k3t3v