2017-11-04 16:59:48 +00:00
|
|
|
FROM benweet/stackedit-base
|
|
|
|
|
2018-01-18 19:54:54 +00:00
|
|
|
RUN mkdir -p /opt/stackedit/stackedit_v4
|
|
|
|
WORKDIR /opt/stackedit/stackedit_v4
|
2017-11-04 16:59:48 +00:00
|
|
|
|
2018-01-18 19:54:54 +00:00
|
|
|
ENV SERVE_V4 true
|
2018-02-01 23:53:51 +00:00
|
|
|
ENV V4_VERSION 4.3.22
|
2018-01-18 19:54:54 +00:00
|
|
|
RUN npm pack stackedit@$V4_VERSION \
|
|
|
|
&& tar xzf stackedit-*.tgz --strip 1 \
|
|
|
|
&& yarn \
|
2018-08-17 10:13:08 +00:00
|
|
|
&& yarn cache clean \
|
|
|
|
&& rm -rf ~/.cache/bower \
|
|
|
|
&& rm -rf ~/.local/share/bower
|
2018-01-18 19:54:54 +00:00
|
|
|
|
|
|
|
WORKDIR /opt/stackedit
|
|
|
|
|
2018-01-19 23:32:14 +00:00
|
|
|
COPY package*json /opt/stackedit/
|
2018-01-18 19:54:54 +00:00
|
|
|
COPY gulpfile.js /opt/stackedit/
|
2018-01-20 11:24:43 +00:00
|
|
|
RUN npm install --unsafe-perm \
|
2018-01-19 22:56:11 +00:00
|
|
|
&& npm cache clean --force
|
2018-01-18 19:54:54 +00:00
|
|
|
COPY . /opt/stackedit
|
2017-11-04 16:59:48 +00:00
|
|
|
ENV NODE_ENV production
|
2018-01-19 22:56:11 +00:00
|
|
|
RUN npm run build
|
2017-11-04 16:59:48 +00:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD [ "node", "." ]
|