| 1234567891011121314151617181920212223242526 |
- FROM phusion/passenger-nodejs:2.5.1
- ###########################################################################
- # install & build
- ###########################################################################
- RUN node -v
- RUN apt-get update -yqq && apt-get clean
- RUN npm i -g yarn@1.22 pm2@5.2
- RUN chmod 0777 / && mkdir -p /lms_resources && chmod 0777 /lms_resources && mkdir -p /ulearn && mkdir -p /ulearn/.uclms && mkdir -p /ulearn/.pm2 && chmod -R 0777 /ulearn && mkdir -p /.uclms && mkdir -p /.pm2 && chmod 0777 /.uclms && chmod 0777 /.pm2
- RUN groupadd --gid 2001 user2001 && groupadd ulearn && useradd -d /ulearn -u 2001 -g 2001 -G ulearn,user2001 user2001
- RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && chmod a+x kubectl && mv ./kubectl /usr/local/bin/kubectl
- RUN npm i -g pm2@4.2.1
- WORKDIR /ulearn
- COPY current/ ./
- COPY entrypoint.sh .
- RUN yarn install
- RUN NODE_OPTIONS=--max_old_space_size=8192 npm run compile && chown -R root:ulearn build && chmod -R ga+w build
- ###########################################################################
- # run
- ###########################################################################
- EXPOSE 23000
- CMD ["/ulearn/entrypoint.sh"]
|