fix: use HTTPS CRAN mirror and fix CA cert trust for R package installs - #14
Open
dhaley wants to merge 7 commits into
Open
fix: use HTTPS CRAN mirror and fix CA cert trust for R package installs#14dhaley wants to merge 7 commits into
dhaley wants to merge 7 commits into
Conversation
- install_r_packages.R: use https://cloud.r-project.org (was HTTP) - install_r_packages.R: add verification that remotes installed before calling library('remotes') - gives clear error message on failure - Dockerfile.rocker: run update-ca-certificates after copying NLR certs - Dockerfile.rocker: set CURL_CA_BUNDLE and SSL_CERT_FILE env vars so R's libcurl uses the system cert store - Add docker-compose.ci.yml for smoke testing Dockerfile.rocker - Add .github/workflows/ci-rocker.yml to test Dockerfile.rocker on PR
added 6 commits
July 15, 2026 17:46
When ROCKER_REGISTRY is set (e.g. to the ECR pull-through cache prefix), Docker Hub images are pulled via the cache, avoiding rate limits and transient Docker Hub outages. When ROCKER_REGISTRY is unset (local dev), falls back to pulling directly from Docker Hub.
The node stage downloads NLR CA certs from raw.github.nrel.gov which is only reachable from internal networks (CodeBuild VPC). On public GitHub Actions runners this fails with DNS resolution error. Add --connect-timeout 5 and || true so the build continues without the certs when running outside the internal network. The certs are only needed for production deployments (handled by CodeBuild).
The node stage is a lightweight cert-fetching helper. Official Docker Hub images (node, alpine, etc.) require the library/ namespace prefix in ECR pull-through cache (docker-hub/library/node), but third-party images like rocker/r-ver work directly (docker-hub/rocker/r-ver). Keep node pulling from Docker Hub directly - it's small, rarely rate-limited, and the cert download is already non-fatal.
…tage" This reverts commit cd047a4.
…stage" This reverts commit ee7b311.
Member
|
Hey @dhaley -- just wanted to confirm that we want to deploy NLR's root cert to the public docker container? Is that right? |
nllong
approved these changes
Jul 28, 2026
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.
Problem
R package installation fails in CodeBuild with:
The root cause is that
install_r_packages.Rused an HTTP CRAN mirror which silently fails. Additionally, the NLR CA certs copied into the Docker image were not registered with the system cert store, so R's libcurl did not trust the certificate chain.Fix
https://cloud.r-project.org)update-ca-certificatesafter copying NLR certs in Dockerfile.rockerCURL_CA_BUNDLEandSSL_CERT_FILEenv vars for R's libcurlremotesinstalled before callinglibrary()ECR Pull-Through Cache
ROCKER_REGISTRYbuild arg to pull Docker Hub images via ECR pull-through cacheROCKER_REGISTRYis set (e.g.991404956194.dkr.ecr.us-west-2.amazonaws.com/docker-hub), base images are pulled from the ECR cache, avoiding Docker Hub rate limits and transient 502 outagesROCKER_REGISTRYas a build arg (configured in doeseed-seedweb terraform)