From 4541aea9e7e5b8adbd61bd4f3dfda80656ec268c Mon Sep 17 00:00:00 2001 From: Anthony Lukach Date: Mon, 23 Dec 2024 18:38:41 -0800 Subject: [PATCH] Update Dockerfiles --- Dockerfiles/Dockerfile.cloud_run_offset | 18 +++++++------ Dockerfiles/Dockerfile.cloud_run_orchestrator | 25 +++++++++++-------- Dockerfiles/Dockerfile.cloud_run_tipg | 21 +++++++++------- Dockerfiles/Dockerfile.titiler | 2 +- 4 files changed, 37 insertions(+), 29 deletions(-) diff --git a/Dockerfiles/Dockerfile.cloud_run_offset b/Dockerfiles/Dockerfile.cloud_run_offset index a6bb982b..54099f77 100644 --- a/Dockerfiles/Dockerfile.cloud_run_offset +++ b/Dockerfiles/Dockerfile.cloud_run_offset @@ -18,14 +18,16 @@ RUN pip install \ -r requirements.txt RUN pip install \ - --isolated \ - --no-cache-dir \ - --disable-pip-version-check \ - 'cyclonedx-bom<4.0.0' \ - && pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force \ - && rm requirements.txt - -COPY cerulean_cloud/ /app/cerulean_cloud/ + --isolated \ + --no-cache-dir \ + --disable-pip-version-check \ + 'cyclonedx-bom<4.0.0' +RUN pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force +RUN rm requirements.txt + +COPY cerulean_cloud/__init__.py /app/cerulean_cloud/ +COPY cerulean_cloud/common /app/cerulean_cloud/common +COPY cerulean_cloud/cloud_run_offset_tiles /app/cerulean_cloud/cloud_run_offset_tiles FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final diff --git a/Dockerfiles/Dockerfile.cloud_run_orchestrator b/Dockerfiles/Dockerfile.cloud_run_orchestrator index 26beb3d1..cf1dee66 100644 --- a/Dockerfiles/Dockerfile.cloud_run_orchestrator +++ b/Dockerfiles/Dockerfile.cloud_run_orchestrator @@ -1,7 +1,6 @@ FROM python:3.9-slim AS build-env WORKDIR /app -COPY cerulean_cloud/ /app/cerulean_cloud/ SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -14,16 +13,20 @@ RUN pip install \ --no-warn-script-location \ --isolated \ --target ./site-packages \ - -r ./requirements.txt \ - && pip install \ - --isolated \ - --no-cache-dir \ - --disable-pip-version-check \ - 'cyclonedx-bom<4.0.0' \ - && pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force \ - && rm requirements.txt - -COPY cerulean_cloud/ /app/cerulean_cloud/ + -r ./requirements.txt +RUN pip install \ + --isolated \ + --no-cache-dir \ + --disable-pip-version-check \ + 'cyclonedx-bom<4.0.0' +RUN pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force +RUN rm requirements.txt + +COPY cerulean_cloud/__init__.py /app/cerulean_cloud/ +COPY cerulean_cloud/common /app/cerulean_cloud/common +COPY cerulean_cloud/cloud_run_orchestrator /app/cerulean_cloud/cloud_run_orchestrator +COPY cerulean_cloud/cloud_run_offset_tiles /app/cerulean_cloud/cloud_run_offset_tiles +COPY cerulean_cloud/cloud_function_ais_analysis /app/cerulean_cloud/cloud_function_ais_analysis FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final diff --git a/Dockerfiles/Dockerfile.cloud_run_tipg b/Dockerfiles/Dockerfile.cloud_run_tipg index 890c7123..c7989293 100644 --- a/Dockerfiles/Dockerfile.cloud_run_tipg +++ b/Dockerfiles/Dockerfile.cloud_run_tipg @@ -16,16 +16,19 @@ RUN pip install \ --no-cache-dir \ --upgrade \ --target ./site-packages \ - -r ./requirements.txt \ - && pip install \ - --isolated \ - --no-cache-dir \ - --disable-pip-version-check \ - 'cyclonedx-bom<4.0.0' \ - && pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force \ - && rm requirements.txt + -r ./requirements.txt -COPY cerulean_cloud/ /app/cerulean_cloud/ +RUN pip install \ + --isolated \ + --no-cache-dir \ + --disable-pip-version-check \ + 'cyclonedx-bom<4.0.0' +RUN pip freeze --path ./site-packages | cyclonedx-py -r -i - --purl-bom-ref --format xml -o sbom.xml --force +RUN rm requirements.txt + +COPY cerulean_cloud/__init__.py /app/cerulean_cloud/ +COPY cerulean_cloud/common /app/cerulean_cloud/common +COPY cerulean_cloud/cloud_run_tipg /app/cerulean_cloud/cloud_run_tipg FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final diff --git a/Dockerfiles/Dockerfile.titiler b/Dockerfiles/Dockerfile.titiler index ef01aeb2..300739d4 100644 --- a/Dockerfiles/Dockerfile.titiler +++ b/Dockerfiles/Dockerfile.titiler @@ -5,8 +5,8 @@ WORKDIR /var/task COPY cerulean_cloud/titiler_sentinel/requirements.txt ./requirements.txt COPY cerulean_cloud/titiler_sentinel/handler.py handler.py -COPY cerulean_cloud/auth.py auth.py COPY cerulean_cloud/titiler_sentinel/templates/ ./templates +COPY cerulean_cloud/common/auth.py auth.py # Use after upgrade of Pulumi Docker to >= 4 # COPY --chown=root:root --chmod=400 Dockerfiles/scripts/titiler-entrypoint.sh /entrypoint.sh