Clean up Dockerfile

This commit is contained in:
Matt Rider 2019-01-08 11:22:51 -02:00
parent a4ae2aa35b
commit c96e29bfcb

View File

@ -12,10 +12,8 @@ WORKDIR $WORKDIR
RUN apk --no-cache add git RUN apk --no-cache add git
COPY . . COPY . .
CMD ["yarn", "run", "start"]
FROM base as build-and-test FROM base as build-and-test
ENV NODE_ENV=test
RUN yarn install --production=false --frozen-lockfile --non-interactive RUN yarn install --production=false --frozen-lockfile --non-interactive
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive \ RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive \
&& cd .. \ && cd .. \
@ -31,3 +29,4 @@ COPY --from=build-and-test ./nitro-web/.nuxt ./.nuxt
COPY --from=build-and-test ./nitro-web/static ./static COPY --from=build-and-test ./nitro-web/static ./static
EXPOSE 3000 EXPOSE 3000
CMD ["yarn", "run", "start"]