mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
try to improve build process and remove styleguide node modules after build
This commit is contained in:
parent
860a2f4a93
commit
088336dd2a
18
Dockerfile
18
Dockerfile
@ -11,19 +11,19 @@ WORKDIR $WORKDIR
|
||||
# See: https://github.com/nodejs/docker-node/pull/367#issuecomment-430807898
|
||||
RUN apk --no-cache add git
|
||||
|
||||
# Install Styleguide
|
||||
COPY styleguide/ ./styleguide
|
||||
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
|
||||
|
||||
# Install Web Application
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
|
||||
# Build Styleguide
|
||||
RUN yarn run styleguide:build
|
||||
|
||||
# Install Web Application
|
||||
COPY styleguide/ ./styleguide
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
|
||||
|
||||
# Install and build Styleguide
|
||||
COPY styleguide/ ./styleguide
|
||||
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines \
|
||||
&& cd .. \
|
||||
&& yarn run styleguide:build \
|
||||
&& rm -Rf styleguide/node_modules
|
||||
|
||||
COPY . .
|
||||
RUN ["yarn", "run", "build"]
|
||||
CMD ["yarn", "run", "start"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user