Normalize line endings and clean up Docker build inputs - #10
Open
labkey-tchad wants to merge 15 commits into
Open
Normalize line endings and clean up Docker build inputs#10labkey-tchad wants to merge 15 commits into
labkey-tchad wants to merge 15 commits into
Conversation
Pin eol=lf for files COPY'd into images as Unix scripts (install.R, conf, Rprofile.site, cleanupSessionFiles.sh, rstudio-singleuser) so a fresh checkout is always correct, then remove the now-redundant dos2unix steps (and unused packages) from the affected Dockerfiles.
Separate files a Dockerfile COPYs into the image from host-side build tooling (make, README) by moving the former into a files/ subdirectory per image and updating COPY paths. Build context is unchanged.
Neither file has ever been referenced by any Dockerfile.
Also drop the now-dead rstudio-singleuser eol=lf rule from .gitattributes.
Now that Dockerfile build inputs consistently live under a files/ subdirectory per image, one path pattern covers them instead of an enumerated filename list, so new files added there are covered automatically.
Add images/labkey/Makefile with a target per R image (r, rsandbox, rstudio-base, rstudio). rsandbox, rstudio-base, and rstudio share a single R_VERSION variable (the R/RStudio version); r's Dockerfile pins its own Ubuntu base version, so it takes no version argument. rstudio depends on rstudio-base like the old scripts' pushd/popd did. Remove the now-redundant make and make.bat scripts and update rsandbox/README.md's build instructions accordingly.
labkey-tchad
force-pushed
the
fb_installFsDeps
branch
from
August 14, 2026 20:18
d3b801c to
0d0e4b2
Compare
Leftover from the pre-Makefile build scripts; superseded by images/labkey/Makefile.
The single 'dockerfile: Dockerfile' step only linted a root-level Dockerfile that doesn't exist in this repo. Add recursive: true so it finds every file named Dockerfile anywhere in the tree (recursive mode globs on the literal filename, so it won't catch Dockerfile.echo), and add a second explicit step for python/nbconvert/Dockerfile.echo.
r/Dockerfile: - Consolidate the three apt-get RUN instructions into one (DL3059) and clean up /var/lib/apt/lists afterward (DL3009). - Add --no-install-recommends to the r-cran-* install (DL3015). - Fix 'ln -fs .../America/Los_Angeles/etc/localtime' — a missing space glued the source and destination into one argument, so ln was silently linking into the wrong place (SC2226). rstudio-base/Dockerfile: - Set SHELL with -o pipefail so the piped 'R --version | grep' RUN fails loudly on error instead of masking it (DL4006).
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.
Rationale
Several Dockerfiles ran
dos2unixat build time to repair CRLF line endings, and the files those Dockerfiles consumed were mixed in flat alongside host-side build tooling (make,README.md), making it hard to tell which files were build inputs. This PR fixes line endings at the source via.gitattributes(removing the need fordos2unix), reorganizes build inputs into a consistentfiles/subdirectory per image, and removes dead/unused files and images found along the way.Related Pull Requests
Changes
.gitattributeseol=lfrule (generalized to**/files/**) so build-input files always check out with LF, regardless of the checkout machine'score.autocrlf.dos2unixRUN steps (and unused packages) fromrsandbox,rsandbox-ver,rstudio,rstudio-base, andrstudio-singleuserDockerfiles.install.R,conf,Rprofile.site,cleanupSessionFiles.sh,entrypoint, etc.) into afiles/subdirectory, separate frommake/Makefile/README.md, updatingCOPYpaths accordingly.rstudio-base/initandrstudio-base/rstudio-singleuser— dead files never referenced by any Dockerfile.rstudio-singleuserandrsandbox-verimages.latestand addhadolint/shellcheck/yamllintvalidation workflows.