Skip to content

Commit

Permalink
fix: strip unused node dependencies from docker images (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian authored Mar 8, 2024
1 parent 46dd458 commit 6d86132
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ jobs:
yarn install
yarn lerna run --scope \*\*/${{ matrix.gateway-name }} --include-dependencies --stream build
yarn run pinst --disable
yarn workspaces focus --all --production
yarn workspaces focus ${{ matrix.gateway-name }} --production
- name: Set up Docker Buildx
if: steps.check-build-and-push.outputs.enable == 'true'
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion meteor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN npm install

# Install production dependencies for the worker
WORKDIR /opt/core/packages
RUN yarn workspaces focus --all --production
RUN yarn workspaces focus --production @sofie-automation/job-worker @sofie-automation/corelib

# DEPLOY IMAGE
FROM node:14-alpine
Expand Down
2 changes: 1 addition & 1 deletion packages/mos-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN yarn install --immutable
RUN yarn run pinst --disable
RUN yarn lerna run --scope \*\*/mos-gateway --include-dependencies --stream build
RUN yarn plugin import workspace-tools
RUN yarn workspaces focus --all --production # purge dev-dependencies
RUN yarn workspaces focus mos-gateway --production # purge dev-dependencies

# DEPLOY IMAGE
FROM node:18-alpine
Expand Down
2 changes: 1 addition & 1 deletion packages/playout-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN yarn install --immutable
RUN yarn run pinst --disable
RUN yarn lerna run --scope \*\*/playout-gateway --include-dependencies --stream build
RUN yarn plugin import workspace-tools
RUN yarn workspaces focus --all --production # purge dev-dependencies
RUN yarn workspaces focus playout-gateway --production # purge dev-dependencies

# DEPLOY IMAGE
FROM node:18-alpine
Expand Down

0 comments on commit 6d86132

Please sign in to comment.