Skip to content

Commit b747427

Browse files
author
Issam Kadar
committed
chore/security : fix cve by using alpine base image
1 parent e991eb7 commit b747427

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/annuaire/Dockerfile

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

44
# Set environment variables
55
ENV PYTHONDONTWRITEBYTECODE=1 \
@@ -9,16 +9,15 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
99
ENVIRONMENT=production
1010

1111
# Install system dependencies and uv
12-
RUN apt-get update && apt-get install -y \
12+
RUN apk add --no-cache \
1313
curl \
1414
ca-certificates \
15-
&& rm -rf /var/lib/apt/lists/* \
1615
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
1716
&& mv /root/.local/bin/uv /usr/local/bin/uv \
1817
&& mv /root/.local/bin/uvx /usr/local/bin/uvx
1918

2019
# Create a non-root user and group
21-
RUN groupadd -r -g 1000 annuaire && useradd -r -u 1000 -g annuaire annuaire
20+
RUN addgroup -g 1000 annuaire && adduser -D -u 1000 -G annuaire annuaire
2221

2322
# Set the working directory in the container
2423
WORKDIR /app

0 commit comments

Comments
 (0)