Skip to content

Commit

Permalink
Update Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Dec 24, 2024
1 parent db99899 commit 5b93c13
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
18 changes: 10 additions & 8 deletions Dockerfiles/Dockerfile.cloud_run_offset
Original file line number Diff line number Diff line change
Expand Up @@ -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/common /app/cerulean_cloud/cloud_run_offset_tiles

FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final

Expand Down
23 changes: 12 additions & 11 deletions Dockerfiles/Dockerfile.cloud_run_orchestrator
Original file line number Diff line number Diff line change
@@ -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"]

Expand All @@ -14,16 +13,18 @@ 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/common /app/cerulean_cloud/cloud_run_orchestrator

FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final

Expand Down
21 changes: 12 additions & 9 deletions Dockerfiles/Dockerfile.cloud_run_tipg
Original file line number Diff line number Diff line change
Expand Up @@ -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/common /app/cerulean_cloud/cloud_run_tipg

FROM gcr.io/distroless/python3-debian11:debug-nonroot AS final

Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.titiler
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b93c13

Please sign in to comment.