[SAT-218] fix docker build - #157
Merged
Merged
Conversation
Cristianetaniguti
requested review from
alex-sandercock
and
a lite review from Copilot
September 11, 2026 19:09
Contributor
There was a problem hiding this comment.
🟡 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
latestmanifest 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 resolvelatestonce 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 laterRUNs, 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 ] |
| 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 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 \ | ||
| . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.