Skip to content

Commit c7cf5dc

Browse files
authored
Merge pull request #4 from MirkoZETA/hotfix/fix-vulnerabilities
Fixed OS Package Vulnerabilities and Python Package Vulnerabilities from artifacts analysis on gcloud.
2 parents 415e1e4 + 77e9877 commit c7cf5dc

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
FROM python:3.9-slim-buster
1+
FROM python:3.12-slim-bookworm
22
WORKDIR /app
33

44
COPY requirements.txt ./
55
RUN pip install --no-cache-dir -r requirements.txt
6-
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
6+
RUN pip install --no-cache-dir --upgrade pip setuptools
77

8+
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends build-essential # Update OS packages and keep build-essential
89

910
COPY backend.py ./
1011
COPY src ./src
1112
COPY networks ./networks
1213
COPY bitrates ./bitrates
1314

15+
# CMD ["g++ -O3 -o simulation.out ./src/main.cpp"] # Commented out as per original Dockerfile
1416

15-
# RUN g++ -O3 -o simulation.out ./src/main.cpp
16-
17-
# - 'backend:app' especifica el módulo 'backend.py' y la instancia de Flask 'app'.
18-
# - '--bind 0.0.0.0:8080' hace que Gunicorn escuche en todas las interfaces (0.0.0.0) en el puerto 8080 dentro del contenedor.
19-
# - '--workers 3' configura Gunicorn para usar 3 procesos de trabajo para manejar las peticiones.
2017
CMD ["gunicorn", "backend:app", "--bind", "0.0.0.0:8080", "--workers", "3"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Flask-based backend API for integrating the FlexNetSim C++ library, powering the
1414

1515
1. **Clone the repository:**
1616
```bash
17-
git clone [https://github.com/MirkoZETA/FlexNetSim-API.git](https://github.com/MirkoZETA/FlexNetSim-API.git)
17+
git clone https://github.com/MirkoZETA/FlexNetSim-API.git
1818
cd flask-simulation-backend
1919
```
2020

0 commit comments

Comments
 (0)