Dockerfile 967 B

12345678910111213141516171819202122232425
  1. FROM phusion/passenger-nodejs:2.5.1
  2. ###########################################################################
  3. # install & build
  4. ###########################################################################
  5. RUN node -v
  6. RUN apt-get update -yqq && apt-get clean
  7. RUN npm i -g yarn@1.22 pm2@5.2
  8. RUN useradd -m ulearn
  9. 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
  10. RUN npm i -g pm2@4.2.1
  11. WORKDIR /home/ulearn
  12. COPY current/ ./
  13. COPY entrypoint.sh .
  14. RUN yarn install
  15. RUN NODE_OPTIONS=--max_old_space_size=8192 npm run compile && chown -R root:ulearn build && chmod -R ga+w build
  16. ###########################################################################
  17. # run
  18. ###########################################################################
  19. EXPOSE 23000
  20. CMD ["/home/ulearn/entrypoint.sh"]