Skip to content

Commit

Permalink
add django-py3.13 weblog
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-papazian committed Jan 13, 2025
1 parent cc60d3b commit 4755a7b
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 7 deletions.
6 changes: 4 additions & 2 deletions utils/build/build_python_base_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
# build and push python base images



docker buildx build --load --progress=plain -f utils/build/docker/python/django-py3.13.base.Dockerfile -t datadog/system-tests:django-py3.13.base-v0 .
docker buildx build --load --progress=plain -f utils/build/docker/python/fastapi.base.Dockerfile -t datadog/system-tests:fastapi.base-v4 .
docker buildx build --load --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.13.base-v0 .
docker buildx build --load --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.12.base-v5 .
docker buildx build --load --progress=plain -f utils/build/docker/python/django-poc.base.Dockerfile -t datadog/system-tests:django-poc.base-v4 .
docker buildx build --load --progress=plain -f utils/build/docker/python/flask-poc.base.Dockerfile -t datadog/system-tests:flask-poc.base-v7 .
docker buildx build --load --progress=plain -f utils/build/docker/python/uwsgi-poc.base.Dockerfile -t datadog/system-tests:uwsgi-poc.base-v4 .

if [ "$1" = "--push" ]; then
docker push datadog/system-tests:fastapi.base-v4
docker push datadog/system-tests:python3.13.base-v0
docker push datadog/system-tests:python3.12.base-v5
docker push datadog/system-tests:django-poc.base-v4
docker push datadog/system-tests:flask-poc.base-v7
docker push datadog/system-tests:uwsgi-poc.base-v4
Expand Down
25 changes: 25 additions & 0 deletions utils/build/docker/python/django-py3.13.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM datadog/system-tests:django-py3.13.base-v0

WORKDIR /app

COPY utils/build/docker/python/install_ddtrace.sh binaries* /binaries/
RUN /binaries/install_ddtrace.sh

COPY utils/build/docker/python/django /app
COPY utils/build/docker/python/iast.py /app/iast.py

RUN python manage.py makemigrations
RUN python manage.py migrate
RUN DJANGO_SUPERUSER_PASSWORD=abcd python3 manage.py createsuperuser --noinput --username root --email [email protected]


ENV DD_TRACE_HEADER_TAGS='user-agent:http.request.headers.user-agent'
ENV DD_REMOTECONFIG_POLL_SECONDS=1
ENV _DD_APPSEC_DEDUPLICATION_ENABLED=false


# docker startup
CMD ./app.sh

# docker build -f utils/build/docker/python/django-py3.13.Dockerfile -t test .
# docker run -ti -p 7777:7777 test
20 changes: 20 additions & 0 deletions utils/build/docker/python/django-py3.13.base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.13.1-slim

# install bin dependancies
RUN apt-get update && apt-get install -y curl git gcc g++ make cmake

# print versions
RUN python --version && curl --version

# install python deps
ENV PIP_ROOT_USER_ACTION=ignore
RUN pip install --upgrade pip
RUN pip install django pycryptodome gunicorn gevent requests boto3==1.34.141 'moto[ec2,s3,all]'==5.0.14

# Install Rust toolchain
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
ENV PATH="/root/.cargo/bin:$PATH"

# docker build --progress=plain -f utils/build/docker/python/django-py3.13.base.Dockerfile -t datadog/system-tests:django-py3.13.base-v0 .
# docker push datadog/system-tests:django-py3.13.base-v0

2 changes: 1 addition & 1 deletion utils/build/docker/python/python3.12.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM datadog/system-tests:python3.13.base-v0
FROM datadog/system-tests:python3.12.base-v5

WORKDIR /app

Expand Down
6 changes: 3 additions & 3 deletions utils/build/docker/python/python3.12.base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13.1-slim
FROM python:3.12.1-slim

# install bin dependancies
RUN apt-get update && apt-get install -y curl git gcc g++ make cmake
Expand All @@ -15,6 +15,6 @@ RUN pip install django pycryptodome gunicorn gevent requests boto3==1.34.141 'mo
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
ENV PATH="/root/.cargo/bin:$PATH"

# docker build --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.13.base-v0 .
# docker push datadog/system-tests:python3.13.base-v0
# docker build --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.12.base-v2 .
# docker push datadog/system-tests:python3.12.base-v2

2 changes: 1 addition & 1 deletion utils/scripts/compute-workflow-parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_endtoend_weblogs(library):
*[f"apache-mod-{v}-zts" for v in ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]],
*[f"php-fpm-{v}" for v in ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]],
],
"python": ["flask-poc", "django-poc", "uwsgi-poc", "uds-flask", "python3.12", "fastapi"],
"python": ["flask-poc", "django-poc", "uwsgi-poc", "uds-flask", "python3.12", "fastapi", "django-py3.13"],
"ruby": [
"rack",
"uds-sinatra",
Expand Down

0 comments on commit 4755a7b

Please sign in to comment.