Skip to content

Commit

Permalink
removing extra npm i npm command
Browse files Browse the repository at this point in the history
  • Loading branch information
mattschoch committed Sep 6, 2024
1 parent 9258558 commit 9ddb57d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions deploy/policy-engine.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ RUN curl -L -o opa https://raw.githubusercontent.com/Ptroger/opa-bugfix-build/ma
COPY package*.json ./
COPY .npmrc ./

# Update npm
RUN npm install -g npm@latest

RUN npm ci && npm cache clean --force


# Copy the local code to the container's workspace.
COPY packages ./packages
COPY apps ./apps
Expand All @@ -39,6 +35,8 @@ COPY ./deploy/db-migrator.sh .
RUN chmod +x ./db-migrator.sh

# Copy built application and node_modules
# We need node_modules to run the application and it's more efficient to copy the whole thing from the previous step
# rather than installing it again, even though this includes devDependencies b/c it can use the cache to speed up builds unless deps change.
COPY --from=build /usr/src/app/dist ./dist
COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/local/bin/opa /usr/local/bin/opa
Expand All @@ -49,4 +47,4 @@ ENV PORT=3010
ENV RESOURCE_PATH=/usr/src/app/dist/apps/policy-engine/resource

EXPOSE 3010
CMD ["node", "dist/apps/policy-engine/main.js"]
CMD ["node", "dist/apps/policy-engine/main.js"]

0 comments on commit 9ddb57d

Please sign in to comment.