Dockerfile 624 B

1234567891011121314151617181920212223
  1. FROM node:6.10-alpine
  2. ENV APP_VERSION v1.0.0-RC5
  3. ENV APP_DIR /opt/crowi-plus
  4. RUN apk add --no-cache --update tar
  5. RUN apk add --no-cache --virtual .dl-deps curl \
  6. && mkdir -p ${APP_DIR} \
  7. && curl -SL https://github.com/weseek/crowi-plus/archive/${APP_VERSION}.tar.gz \
  8. | tar -xz -C ${APP_DIR} --strip-components 1 \
  9. && apk del .dl-deps
  10. WORKDIR ${APP_DIR}
  11. RUN apk add --no-cache --virtual .build-deps git \
  12. && yarn global add npm@4 \
  13. && yarn install --production \
  14. && npm run build:prod \
  15. && yarn cache clean \
  16. && apk del .build-deps
  17. VOLUME /data
  18. CMD ["npm", "run", "server:prod"]