Dockerfile 753 B

12345678910111213141516171819202122232425262728
  1. FROM node:6.10-alpine
  2. MAINTAINER Yuki Takei <yuki@weseek.co.jp>
  3. ENV APP_VERSION v1.0.0-RC9
  4. ENV APP_DIR /opt/crowi-plus
  5. # update tar for '--strip-components' option
  6. RUN apk add --no-cache --update tar
  7. # download crowi-plus
  8. RUN apk add --no-cache --virtual .dl-deps curl \
  9. && mkdir -p ${APP_DIR} \
  10. && curl -SL https://github.com/weseek/crowi-plus/archive/${APP_VERSION}.tar.gz \
  11. | tar -xz -C ${APP_DIR} --strip-components 1 \
  12. && apk del .dl-deps
  13. WORKDIR ${APP_DIR}
  14. # setup
  15. RUN apk add --no-cache --virtual .build-deps git \
  16. && yarn global add npm@4 \
  17. && yarn install --production \
  18. && npm run build:prod \
  19. && yarn cache clean \
  20. && apk del .build-deps
  21. VOLUME /data
  22. EXPOSE 3000
  23. CMD ["npm", "run", "server:prod"]