|
|
@@ -0,0 +1,22 @@
|
|
|
+FROM registry.unicraft.org/node:8-update
|
|
|
+
|
|
|
+RUN mkdir -p /ulearn && mkdir -p /lms_resources && mkdir -p /ulearn/.uclms && mkdir -p /ulearn/.pm2 && chmod 0777 / && chmod -R 0777 /ulearn
|
|
|
+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
|
|
|
+RUN apt-get update
|
|
|
+RUN apt-get -y install chinese*
|
|
|
+#RUN yarn global add pm2
|
|
|
+RUN npm install -g pm2@4.2.1
|
|
|
+WORKDIR /ulearn
|
|
|
+COPY current/ ./
|
|
|
+COPY entrypoint.sh .
|
|
|
+
|
|
|
+RUN yarn install --ignore-engines
|
|
|
+#RUN yarn upgrade @ckeditor/ckeditor5-build-classic --ignore-engines
|
|
|
+RUN npm run compile && chown -R root:ulearn build && chmod -R ga+w build
|
|
|
+
|
|
|
+#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 {} +
|
|
|
+
|
|
|
+EXPOSE 23000
|
|
|
+# ENV HOME=/ulearn
|
|
|
+
|
|
|
+CMD ["/ulearn/entrypoint.sh"]
|