Maseshi / Shioru

🧸 (Discord) Your personal assistant that will make your discord never lonely again.
https://shiorus.web.app
MIT License
150 stars 22 forks source link

Update Dockerfile #62

Closed RomaDevWorld closed 1 year ago

RomaDevWorld commented 1 year ago

There is an official Docker image for node.js: https://hub.docker.com/_/node/ So there is no need to install it manually.

I recommend building the image before merging.

RomaDevWorld commented 1 year ago

I'll build and test it myself as soon as I get home

Maseshi commented 1 year ago

Now I've tried it. But it can't be built. I see the error from your code is WORKDIR , this should be set before copy as the path has not been created yet. Based on an example from the documentation of Node.js

  => ERROR [3/4] WORKDIR /usr/src/app 0.3s
------
  > [3/4] WORKDIR /usr/src/app:
------
Dockerfile:5
--------------------
    3 | COPY package*.json /usr/src/app
    4 |
    5 | >>> WORKDIR /usr/src/app
    6 |
    7 | COPY . .
--------------------
ERROR: failed to solve: mkdir /var/lib/docker/overlay2/4f3hdvvfmul830brkuavvrsl6/merged/usr/src/app: not a directory

Anyway, I appreciate your little suggestion. I'm currently tweaking the way Docker works as you mentioned above.

RomaDevWorld commented 1 year ago

Ok, good luck!