forked from weseek/crowi-plus-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 822 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:6.11-alpine
LABEL maintainer Yuki Takei <[email protected]>
ENV APP_VERSION v2.2.1
ENV APP_DIR /opt/crowi-plus
# update tar for '--strip-components' option
RUN apk add --no-cache --update tar
# download crowi-plus
RUN apk add --no-cache --virtual .dl-deps curl \
&& mkdir -p ${APP_DIR} \
&& curl -SL https://github.com/weseek/crowi-plus/archive/${APP_VERSION}.tar.gz \
| tar -xz -C ${APP_DIR} --strip-components 1 \
&& apk del .dl-deps
WORKDIR ${APP_DIR}
# setup
RUN apk add --no-cache --virtual .build-deps git \
&& yarn global add npm@4 \
&& yarn install --production \
&& npm run build:prod \
&& yarn cache clean \
&& apk del .build-deps
COPY docker-entrypoint.sh /
VOLUME /data
EXPOSE 3000
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["npm", "run", "server:prod"]