Skip to content

Commit

Permalink
Add python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gamingrobot committed Jan 15, 2025
1 parent 9e0c98f commit 80de0cf
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions src/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,70 +1,66 @@
# Contrast Security, Inc licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.

FROM python:3.12-slim-bookworm AS builder-312

ARG VERSION=7.2.0

FROM python:3.13-slim-bookworm AS builder-313
ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf
RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
&& pip install --target=/contrast "contrast-agent==${VERSION}" \
&& echo "{ \"version\": \"${VERSION}\" }" > /contrast/image-manifest.json

FROM python:3.12-slim-bookworm AS builder-312
ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf
RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
&& pip install --target=/contrast "contrast-agent==${VERSION}" \
&& echo "{ \"version\": \"${VERSION}\" }" > /contrast/image-manifest.json

FROM python:3.11-slim-bookworm AS builder-311

ARG VERSION=7.2.0

ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf

RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
&& pip install --target=/contrast "contrast-agent==${VERSION}" \
&& echo "{ \"version\": \"${VERSION}\" }" > /contrast/image-manifest.json

FROM python:3.10-slim-bookworm AS builder-310

ARG VERSION=7.2.0

ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf

RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
&& pip install --target=/contrast "contrast-agent==${VERSION}" \
&& echo "{ \"version\": \"${VERSION}\" }" > /contrast/image-manifest.json

FROM python:3.9-slim-bookworm AS builder-39

ARG VERSION=7.2.0

ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf

RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
&& pip install --target=/contrast "contrast-agent==${VERSION}" \
&& echo "{ \"version\": \"${VERSION}\" }" > /contrast/image-manifest.json

FROM python:3.8-slim-bookworm AS builder-38

ARG VERSION=7.2.0

ARG VERSION=9.8.0
RUN set -xe \
&& apt-get update \
&& apt-get install -y build-essential autoconf

RUN set -xe \
&& mkdir -p /contrast \
&& echo ${VERSION} \
Expand All @@ -79,13 +75,14 @@ RUN set -xe \
&& adduser -u 1001 -G custom-group -D -H custom-user

COPY ./src/shared/entrypoint.sh /entrypoint.sh
COPY --from=builder-313 /contrast /contrast
COPY --from=builder-312 /contrast /contrast
COPY --from=builder-311 /contrast /contrast
COPY --from=builder-310 /contrast /contrast
COPY --from=builder-39 /contrast /contrast
COPY --from=builder-38 /contrast /contrast

ARG VERSION=7.2.0
ARG VERSION=9.8.0
ENV CONTRAST_MOUNT_PATH=/contrast-init \
CONTRAST_VERSION=${VERSION} \
CONTRAST_AGENT_TYPE=python
Expand Down

0 comments on commit 80de0cf

Please sign in to comment.