Skip to content

[SAT-218] fix docker build - #157

Merged
alex-sandercock merged 1 commit into
mainfrom
docker_fix
Sep 14, 2026
Merged

alex-sandercock merged 1 commit into
mainfrom
docker_fix

Conversation

@Cristianetaniguti

Copy link
Copy Markdown
Collaborator

BIGapp docker image has two components, one image just for the dependencies and then the main image that is build on the dependencies. This structure was created to avoid long building time for small updates once BIGapp is BIG.
The dependencies one needs to be updated manually when it becomes deprecated.
This bugfix makes evident when the package fails to install on the main image, throwing a clear error and stopping the build. The previous behavior would fail in silent and still build the image without BIGapp.
After failing is triggered, the dependencies image should be adapted and re-runned.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved workflow, dependency-installation, and cache correctness issues remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves BIGapp Docker dependency and application builds by validating package installation and publishing versioned dependency images.

Changes:

  • Adds explicit BIGapp installation validation and build failures.
  • Updates dependency-image tagging, caching, and multi-architecture publishing.
  • Configures CI to build application images from dependency images.
File summaries
File Summary Findings
inst/update_dep_image.sh Builds and publishes dependency images. Moderate: Pass DEPS_TAG to the amd64 build to prevent cache reuse across incompatible R/Bioconductor versions (2 votes).
inst/Dockerfile.deps Installs and validates R dependencies. Moderate: -e prevents the fallback after install2.r fails (3 votes). Nit: Mount ccache on all compiling steps (1 vote).
Dockerfile Validates BIGapp installation during image creation. No findings.
.github/workflows/dockerhub-on-version.yml Builds application images from dependency images. Critical: Restore the production main trigger (1 vote). Moderate: Avoid mutable latest resolution across architecture jobs (1 vote).
Review details

Suppressed comments (2)

.github/workflows/dockerhub-on-version.yml:19

  • Using the mutable latest manifest makes these package-version builds nondeterministic: the amd64 and arm64 jobs resolve it independently, so a manual dependency-image update during the run can produce an app manifest whose architectures contain different dependency images, and reruns can silently change the base. Pin an immutable dependency tag/digest, or resolve latest once and pass that digest to both jobs.
  DEPS_TAG: latest

inst/Dockerfile.deps:40

  • The new ccache mount is only present while configuring ccache; this install step mounts only rsrc-${DEPS_TAG}, and the CRAN/fallback install steps likewise do not mount /root/.cache/ccache. Since the compilers run in those later RUNs, they write to the image filesystem rather than the scoped BuildKit cache, so the new cache ID provides no cross-build compile reuse. Mount the ccache cache on every RUN that compiles R packages (while retaining the R source cache).
RUN --mount=type=cache,target=/root/.cache/R/src,id=rsrc-${DEPS_TAG} Rscript - <<'RS'
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

on:
push:
branches: [ main, vcf_sanity_check ]
branches: [ main, docker_fix ]
Comment thread inst/Dockerfile.deps
httr future shinycssloaders RColorBrewer \
tibble rrBLUP MASS Matrix matrixcalc BIGr"
RUN install2.r --skipinstalled --ncpus 1 $CRAN_PKGS || true
RUN install2.r --skipinstalled --ncpus 1 $CRAN_PKGS
Comment thread inst/update_dep_image.sh
Comment on lines 15 to 21
docker buildx build \
-f Dockerfile.deps \
--platform linux/amd64 \
-t $IMAGE_DEPS:$DEPS_TAG-amd64 \
-t $IMAGE_DEPS:$BUILD_ID-amd64 \
--progress=plain \
--load \
.
@alex-sandercock
alex-sandercock merged commit eec6774 into main Sep 14, 2026
9 checks passed
@alex-sandercock
alex-sandercock deleted the docker_fix branch September 14, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants