Skip to content

Commit d0021de

Browse files
author
wwanarif
committed
fix setuptools CVE
Signed-off-by: wwanarif <[email protected]>
1 parent 0eb7d18 commit d0021de

File tree

8 files changed

+23
-186
lines changed

8 files changed

+23
-186
lines changed

app-backend/Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
2-
3-
# Copyright (C) 2024 Intel Corporation
4-
# SPDX-License-Identifier: Apache-2.0
5-
61
FROM python:3.11-slim
72

83
RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
9-
libgl1-mesa-glx \
10-
libjemalloc-dev \
11-
git
4+
libgl1-mesa-glx=22.3.6-1+deb12u1 \
5+
libjemalloc-dev=5.3.0-1 \
6+
git=1:2.39.5-0+deb12u1 && \
7+
rm -rf /var/lib/apt/lists/*
128

139
RUN useradd -m -s /bin/bash user && \
1410
mkdir -p /home/user && \
@@ -18,7 +14,7 @@ WORKDIR /home/user/
1814
RUN git clone https://github.com/opea-project/GenAIComps.git
1915

2016
WORKDIR /home/user/GenAIComps
21-
RUN pip install --no-cache-dir --upgrade pip && \
17+
RUN pip install --no-cache-dir --upgrade pip==24.3.1 setuptools==75.3.0 && \
2218
pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt
2319

2420
COPY ./app_gateway.py /home/user/app_gateway.py

app-frontend/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33

44
# Use node 20.11.1 as the base image
55
FROM node:20.11.1 AS vite-app
6-
6+
77
COPY react /usr/app/react
88
WORKDIR /usr/app/react
99

10-
RUN ["npm", "install"]
11-
RUN ["npm", "run", "build"]
12-
10+
RUN npm install && npm run build
1311

1412
FROM nginx:alpine
1513

1614
# Install uuidgen in the nginx:alpine image
17-
RUN apk add --no-cache util-linux
15+
RUN apk add --no-cache util-linux=2.40.1-r1
1816

1917
COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
2018
COPY ./react/env.sh /docker-entrypoint.d/env.sh

studio-backend/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Use an official Python runtime as a parent image
2-
FROM python:3.9-slim
2+
FROM python:3.11-slim
33

44
# Set the working directory in the container
55
WORKDIR /usr/src/
66

77
# Copy the current directory contents into the container at /usr/src/app
88
COPY app /usr/src/app
99

10-
# Install any needed packages specified in requirements.txt
11-
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt
10+
# Upgrade setuptools to a safe version and install any needed packages specified in requirements.txt
11+
RUN pip install --no-cache-dir --upgrade pip==24.3.1 setuptools==75.3.0 && \
12+
pip install --no-cache-dir -r /usr/src/app/requirements.txt
1213

1314
# Define environment variable
1415
ENV PORT=5000

studio-frontend/Dockerfile

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
# Build local monorepo image
2-
# docker build --no-cache -t flowise .
3-
4-
# Run image
5-
# docker run -d -p 3000:3000 flowise
6-
71
FROM node:20-alpine
8-
RUN apk add --update libc6-compat python3 make g++
9-
# needed for pdfjs-dist
10-
RUN apk add --no-cache build-base cairo-dev pango-dev
11-
12-
# Install Chromium
13-
RUN apk add --no-cache chromium
142

15-
#install PNPM globaly
16-
RUN npm install -g pnpm
3+
# Install necessary packages
4+
RUN apk add --no-cache gcompat=1.1.0-r4 python3=3.12.7-r0 make=4.4.1-r2 g++=13.2.1_git20240309-r0 \
5+
# Needed for pdfjs-dist
6+
build-base=0.5-r3 cairo-dev=1.18.0-r0 pango-dev=1.52.2-r0 \
7+
# Install Chromium
8+
chromium=130.0.6723.116-r0 && \
9+
# Install PNPM globally
10+
npm install -g [email protected]
1711

1812
ENV PUPPETEER_SKIP_DOWNLOAD=true
1913
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
20-
2114
ENV NODE_OPTIONS=--max-old-space-size=8192
2215

2316
WORKDIR /usr/src
2417

2518
# Copy app source
2619
COPY . .
2720

28-
RUN pnpm install
29-
30-
RUN pnpm build
21+
# Install dependencies and build the app
22+
RUN pnpm install && pnpm build
3123

3224
EXPOSE 3000
3325

34-
CMD [ "pnpm", "start" ]
26+
CMD ["pnpm", "start"]

studio-frontend/docker/.env.example

Lines changed: 0 additions & 53 deletions
This file was deleted.

studio-frontend/docker/Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

studio-frontend/docker/README.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

studio-frontend/docker/docker-compose.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)