Dockerfile 998 B

12345678910111213141516171819202122
  1. FROM registry.unicraft.org/node:8-update
  2. RUN mkdir -p /ulearn && mkdir -p /lms_resources && mkdir -p /ulearn/.uclms && mkdir -p /ulearn/.pm2 && chmod 0777 / && chmod -R 0777 /ulearn
  3. RUN for i in `nawk 'BEGIN{ for(i=2000;i<=2200;i++) print i}'`; do groupadd --gid $i user$i; useradd -d /ulearn -u $i -g $i user$i; usermod -G ulearn,user$i user$i; done
  4. RUN apt-get update
  5. RUN apt-get -y install chinese*
  6. #RUN yarn global add pm2
  7. RUN npm install -g pm2@4.2.1
  8. WORKDIR /ulearn
  9. COPY current/ ./
  10. COPY entrypoint.sh .
  11. RUN yarn install --ignore-engines
  12. #RUN yarn upgrade @ckeditor/ckeditor5-build-classic --ignore-engines
  13. RUN npm run compile && chown -R root:ulearn build && chmod -R ga+w build
  14. #RUN find . -not -name '.' -not -name '..' -not -name 'entrypoint.sh' -not -name 'build.server.js' -not -name 'ecosystem.json' -not -path './build*' -not -path './node_modules*' -not -path './resources*' -not -path './i18n*' -exec rm -Rf {} +
  15. EXPOSE 23000
  16. # ENV HOME=/ulearn
  17. CMD ["/ulearn/entrypoint.sh"]