Browse Source

3x+ speed boost for dev build

dev
David Ludwig 4 years ago
parent
commit
cfaae99af3
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      Dockerfile

+ 5
- 10
Dockerfile View File

@ -38,24 +38,19 @@ FROM base-slim AS base-slim-dev
# Development Image --------------------------------------------------------------------------------
# Define the base image
FROM base-${BASE}-dev AS dev
ARG SERVICE
FROM base-${BASE}-dev AS dev-base
WORKDIR /opt/app
# Environment configuration
ENV PATH "/app/node_modules/.bin:$PATH"
RUN echo "#!/bin/sh" >> /bin/lerna && \
echo '( cd /opt/app && ./node_modules/.bin/lerna "$@" )' >> /bin/lerna && \
chmod +x /bin/lerna
# Copy over Lerna stuff
COPY lerna.json package.json ./
COPY lerna.json package.json yarn.lock ./
RUN yarn install
# Copy TS configs
COPY tsconfig*.json ./
# Symlink the requested service to /app
# Define the dev image
FROM dev-base AS dev
ARG SERVICE
RUN ln -s /opt/app/services/${SERVICE} /app
WORKDIR /app
CMD [ "yarn", "run", "start:dev" ]


Loading…
Cancel
Save