Skip to content

Commit

Permalink
build: fix yarn version in docker image to be the same as in local en…
Browse files Browse the repository at this point in the history
…v (v3.0.1)
  • Loading branch information
scorpion9979 committed Apr 4, 2022
1 parent 032c064 commit 96a2fd0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ WORKDIR /bot

# 1. Cache dependencies.
FROM base AS cache
COPY ./.yarnrc.yml ./.yarnrc.yml
COPY ./.yarn/ ./.yarn/
COPY ./package.json ./package.json
COPY ./yarn.lock ./yarn.lock
RUN yarn install --production --ignore-scripts
RUN yarn install --immutable
RUN npm prune --production --no-package-lock

# 2. Build the code.
FROM base AS build
COPY ./.yarnrc.yml ./.yarnrc.yml
COPY ./.yarn/ ./.yarn/
COPY ./package.json ./package.json
COPY ./yarn.lock ./yarn.lock
RUN yarn install --ignore-scripts
RUN yarn install --immutable
COPY ./src ./src
COPY ./tsconfig.json ./tsconfig.json
COPY ./tsconfig.prod.json ./tsconfig.prod.json
Expand Down

0 comments on commit 96a2fd0

Please sign in to comment.