Hi Cindy,
Thanks for this. I made one change as I saw that the node_modules/.cache dir could not be created (I think docusaurus writes there) at runtime. Here is the change I made to the Dockerfile (add a chown on the homedir for node):
# We'll run the app as the `node` user, so put it in their home directory
WORKDIR /home/node/app
# Do the chown so that the node_modules/.cache can be updated
RUN chown -R node:node /home/node
# Copy the source code over
COPY --chown=node:node . /home/node/app/
Hi Cindy,
Thanks for this. I made one change as I saw that the node_modules/.cache dir could not be created (I think docusaurus writes there) at runtime. Here is the change I made to the Dockerfile (add a chown on the homedir for node):
I get the following error in the last step:
I found that removing the "--chown=node:node" part of the last COPY command solves the issue.
But I wonder if it is going to cause other issues.
I simplified mine to just do production version and it worked.