Ensure npm has access to package.json. (#31)

This is a common issue, and I ran into it while installing esmBot. For me, and probably others npm throws a permissions error while building, and no packages will be installed. Simply chown the package.json to the node:node user, and this will work again.
This commit is contained in:
elitwo 2020-12-22 23:20:05 +00:00 committed by GitHub
parent 9b4861ae4a
commit 9febf3f9d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,8 +47,8 @@ COPY ./assets/caption2.ttf /home/esmBot/.font/caption2.ttf
COPY ./assets/hbc.ttf /home/esmBot/.font/hbc.ttf COPY ./assets/hbc.ttf /home/esmBot/.font/hbc.ttf
RUN fc-cache -f RUN fc-cache -f
COPY ./package.json package.json COPY --chown=node:node ./package.json package.json
COPY ./package-lock.json package-lock.json COPY --chown=node:node ./package-lock.json package-lock.json
RUN npm install RUN npm install
COPY . . COPY . .
USER esmBot USER esmBot