Skip to content

Commit

Permalink
fix DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Jan 17, 2022
2 parents 0013d05 + 6219268 commit 8585752
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ FROM base AS build

WORKDIR /app
COPY . .

# delete package-lock.json - more info https://github.com/asyncapi/.github/issues/123
# delete that line and install by `npm ci` when mentioned issue will be resolved
RUN rm -rf package-lock.json
# install dependencies
RUN npm ci
RUN npm install

# build to a production Javascript
RUN npm run build:prod
Expand All @@ -24,8 +28,8 @@ FROM base AS release
WORKDIR /app
COPY --from=build /app/dist ./dist
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package* ./
COPY --from=build /app/package* ./
# COPY package* ./
# install only production dependencies (defined in "dependencies")
RUN npm ci --only=production
# copy OpenaAPI document
Expand Down

0 comments on commit 8585752

Please sign in to comment.