Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions openc3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG OPENC3_TAG=latest
ARG OPENC3_IMAGE=openc3-ruby

FROM ${OPENC3_REGISTRY}/${OPENC3_NAMESPACE}/${OPENC3_IMAGE}:${OPENC3_TAG}

Check warning on line 6 in openc3/Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use a specific version tag for the image.

See more on https://sonarcloud.io/project/issues?id=OpenC3_cosmos&issues=AaCDVf0JcTp7cyTDvCz6&open=AaCDVf0JcTp7cyTDvCz6&pullRequest=3840

WORKDIR /openc3/

Expand Down Expand Up @@ -43,15 +43,20 @@
# Seed UV cache to /openc3/uv_cache/ so system wheels are baked into the
# image. At runtime, the operator copies this into /gems/uv/ (the volume)
# so plugins can reuse these wheels without re-downloading.
RUN --mount=type=cache,target=/root/.cache/uv \
UV_CACHE_DIR=/openc3/uv_cache uv sync --frozen --no-dev --no-install-project
#
# Deliberately no --mount=type=cache on these uv steps. UV_CACHE_DIR has to
# point at a real layer so the seed ships in the image, and a cache mount never
# lands in one - so a mount here is dead weight (uv writes only to
# UV_CACHE_DIR). Routing the sync through a mount and copying it into the seed
# afterwards would bake wheels from unrelated past builds into the image, which
# is exactly what verify-uv-cache.sh exists to prevent.
RUN UV_CACHE_DIR=/openc3/uv_cache uv sync --frozen --no-dev --no-install-project

Check warning on line 53 in openc3/Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--no-build" can lead to the execution of setup scripts. Make sure it is safe here.

See more on https://sonarcloud.io/project/issues?id=OpenC3_cosmos&issues=AaCDVf0JcTp7cyTDvCz7&open=AaCDVf0JcTp7cyTDvCz7&pullRequest=3840

# Copy application code (excluding .venv from source)
COPY --chown=${IMAGE_USER}:${IMAGE_GROUP} python/ .

# Install the application itself with dependencies already present
RUN --mount=type=cache,target=/root/.cache/uv \
UV_CACHE_DIR=/openc3/uv_cache uv sync --frozen --no-dev
RUN UV_CACHE_DIR=/openc3/uv_cache uv sync --frozen --no-dev

Check warning on line 59 in openc3/Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--no-build" can lead to the execution of setup scripts. Make sure it is safe here.

See more on https://sonarcloud.io/project/issues?id=OpenC3_cosmos&issues=AaCDVf0JcTp7cyTDvCz8&open=AaCDVf0JcTp7cyTDvCz8&pullRequest=3840

WORKDIR /openc3/

Expand Down
Loading