diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..145a841 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +### Git ### +.git* + +# Dependency directories +node_modules + +# Optional NPM cache directory +.npm diff --git a/Dockerfile b/Dockerfile index cdf923b..979e649 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir -p $HOME/application WORKDIR $HOME/application # copy the entire application -COPY --chown=default:root . . +COPY --chown=1001:root . . # install yarn globaly RUN npm install -g yarn @@ -22,6 +22,12 @@ RUN yarn install # build the application RUN yarn run build +# Change ownership of cache to make it writable +RUN chown -R 1001 ~/.cache + +# Change permissions to fix EACCESS permission error +RUN chmod -R 755 $HOME + # set non-root user USER 1001