Added v4 in Dockerfile

This commit is contained in:
benweet 2018-01-18 19:54:54 +00:00
parent 19f8c69527
commit dfb0d0c382

View File

@ -1,13 +1,24 @@
FROM benweet/stackedit-base FROM benweet/stackedit-base
RUN mkdir -p /usr/src/app RUN mkdir -p /opt/stackedit/stackedit_v4
WORKDIR /usr/src/app WORKDIR /opt/stackedit/stackedit_v4
COPY package.json /usr/src/app/ ENV SERVE_V4 true
COPY yarn.lock /usr/src/app/ ENV V4_VERSION 4.3.21
COPY gulpfile.js /usr/src/app/ RUN npm pack stackedit@$V4_VERSION \
RUN yarn && yarn cache clean && tar xzf stackedit-*.tgz --strip 1 \
COPY . /usr/src/app && yarn \
&& yarn cache clean
WORKDIR /opt/stackedit
COPY package.json /opt/stackedit/
COPY yarn.lock /opt/stackedit/
COPY gulpfile.js /opt/stackedit/
RUN npm install
&& npm cache clean --force
&& npm run build
COPY . /opt/stackedit
ENV NODE_ENV production ENV NODE_ENV production
RUN yarn run build RUN yarn run build