stackedit/Dockerfile

26 lines
510 B
Docker
Raw Normal View History

FROM benweet/stackedit-base
2018-01-19 03:54:54 +08:00
RUN mkdir -p /opt/stackedit/stackedit_v4
WORKDIR /opt/stackedit/stackedit_v4
2018-01-19 03:54:54 +08:00
ENV SERVE_V4 true
2018-02-02 07:53:51 +08:00
ENV V4_VERSION 4.3.22
2018-01-19 03:54:54 +08:00
RUN npm pack stackedit@$V4_VERSION \
&& tar xzf stackedit-*.tgz --strip 1 \
&& yarn \
&& yarn cache clean
WORKDIR /opt/stackedit
2018-01-20 07:32:14 +08:00
COPY package*json /opt/stackedit/
2018-01-19 03:54:54 +08:00
COPY gulpfile.js /opt/stackedit/
2018-01-20 19:24:43 +08:00
RUN npm install --unsafe-perm \
2018-01-20 06:56:11 +08:00
&& npm cache clean --force
2018-01-19 03:54:54 +08:00
COPY . /opt/stackedit
ENV NODE_ENV production
2018-01-20 06:56:11 +08:00
RUN npm run build
EXPOSE 8080
CMD [ "node", "." ]