Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove unnecessary cross-spawn dependencies from docker images #5630

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/owl-bot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
# https://hub.docker.com/_/node
FROM node:18-alpine

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

# Bump the heap size
ENV NODE_OPTIONS='--max-old-space-size=8192'

Expand Down
3 changes: 3 additions & 0 deletions packages/owl-bot/Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ RUN npm run compile

FROM node:18.20.5-slim

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

# Install git binary and remove unnecessary cache files to keep the
# image size small.

Expand Down
3 changes: 3 additions & 0 deletions packages/owl-bot/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ RUN npm run compile

FROM node:18.20.5-slim

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

# Create and change to the app directory.
WORKDIR /usr/src/app

Expand Down
3 changes: 3 additions & 0 deletions packages/release-trigger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RUN apt-get update && \
# Remove base python3 installation, as we install our own version.
RUN rm -r /usr/bin/python3

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

USER node

# Install pyenv
Expand Down
3 changes: 3 additions & 0 deletions packages/release-trigger/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ RUN npm run compile

FROM node:18-slim

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

WORKDIR /home/node

COPY package*.json ./
Expand Down
3 changes: 3 additions & 0 deletions packages/snippet-bot/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ RUN npm run compile

FROM node:18.20.5-slim

# Remove unnecessary cross-spawn from npm to resolve CVE-2024-21538
RUN rm -r /usr/local/lib/node_modules/npm/node_modules/cross-spawn/

# Create and change to the app directory.
WORKDIR /usr/src/app

Expand Down
Loading