mirror of
https://gitee.com/mafgwo/stackedit
synced 2024-11-16 11:42:23 +08:00
27 lines
535 B
Docker
27 lines
535 B
Docker
FROM benweet/stackedit-base
|
|
|
|
RUN mkdir -p /opt/stackedit/stackedit_v4
|
|
WORKDIR /opt/stackedit/stackedit_v4
|
|
|
|
ENV SERVE_V4 true
|
|
ENV V4_VERSION 4.3.21
|
|
RUN npm pack stackedit@$V4_VERSION \
|
|
&& tar xzf stackedit-*.tgz --strip 1 \
|
|
&& yarn \
|
|
&& yarn cache clean
|
|
|
|
WORKDIR /opt/stackedit
|
|
|
|
COPY package.json /opt/stackedit/
|
|
COPY package-lock.lock /opt/stackedit/
|
|
COPY gulpfile.js /opt/stackedit/
|
|
RUN npm install \
|
|
&& npm cache clean --force
|
|
COPY . /opt/stackedit
|
|
ENV NODE_ENV production
|
|
RUN npm run build
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD [ "node", "." ]
|