Skip to content

Commit

Permalink
Merge pull request #212 from nmfs-opensci/eeholmes-patch-2
Browse files Browse the repository at this point in the history
try pulling master
  • Loading branch information
eeholmes authored Feb 5, 2025
2 parents fd4e1bf + a9018a8 commit a8f6de2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ USER root
# DISPLAY Tell applications where to open desktop apps - this allows notebooks to pop open GUIs
ENV REPO_DIR="/srv/repo" \
DISPLAY=":1.0" \
R_VERSION="4.4.2"
R_VERSION="4.4.1"
# The latest rocker will set CRAN to 'latest' but we need a date stamped version for reproducibility
# So pull the latest and use one earlier
ARG R_VERSION_PULL="4.4.2"
Expand Down
20 changes: 14 additions & 6 deletions scripts/install-rocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,21 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# So that CRAN repo is pinned to a date.
cd ${REPO_DIR}
ROCKER_DOCKERFILE_NAME="${R_DOCKERFILE}.Dockerfile"
# Pull a tag (release) or pull the latest master (stable)
# TAR_NAME="R${R_VERSION_PULL}"
TAR_NAME="master"
# For degugging use: wget https://github.com/eeholmes/rocker-versioned2/archive/refs/tags/R4.4.1.tar.gz
wget https://github.com/rocker-org/rocker-versioned2/archive/refs/tags/R${R_VERSION_PULL}.tar.gz
tar zxvf R${R_VERSION_PULL}.tar.gz && \
mv rocker-versioned2-R${R_VERSION_PULL}/scripts /rocker_scripts && \
mv rocker-versioned2-R${R_VERSION_PULL}/dockerfiles/${ROCKER_DOCKERFILE_NAME} /rocker_scripts/original.Dockerfile && \
rm R${R_VERSION_PULL}.tar.gz && \
rm -rf rocker-versioned2-R${R_VERSION_PULL}
# wget https://github.com/rocker-org/rocker-versioned2/archive/refs/tags/R${R_VERSION_PULL}.tar.gz
if [[ "$TAR_NAME" == "master" ]]; then
wget https://github.com/rocker-org/rocker-versioned2/archive/refs/heads/${TAR_NAME}.tar.gz
else
wget https://github.com/rocker-org/rocker-versioned2/archive/refs/tags/${TAR_NAME}.tar.gz
fi
tar zxvf ${TAR_NAME}.tar.gz && \
mv rocker-versioned2-${TAR_NAME}/scripts /rocker_scripts && \
mv rocker-versioned2-${TAR_NAME}/dockerfiles/${ROCKER_DOCKERFILE_NAME} /rocker_scripts/original.Dockerfile && \
rm ${TAR_NAME}.tar.gz && \
rm -rf rocker-versioned2-${TAR_NAME}

cd /
# Read the Dockerfile and process each line
Expand Down

0 comments on commit a8f6de2

Please sign in to comment.