From 56bed77b64ce2b9743201bc0c236672058026ce7 Mon Sep 17 00:00:00 2001 From: Roy Francis Date: Thu, 6 Mar 2025 17:24:09 +0100 Subject: [PATCH] Updated docker image. Updated quarto, added new R pkgs for updated lab. --- README.md | 10 +++++----- dockerfile | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c17f1360..570c79a7 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,17 @@ as the first thing, so that old rendered files are not overwritten. You can preview changes and build the whole website locally without a local installation of R or dependency packages by using the pre-built Docker image. -:exclamation: **Note:** Image size: 4.86GB. +:exclamation: **Note:** Image size: 5.4GB. Clone the repo if not already done. Make sure you are standing in the repo directory. -To build the complete site, +To render the complete site, ``` docker run --platform linux/amd64 --rm -u 1000:1000 -v ${PWD}:/qmd ghcr.io/nbisweden/workshop-ngsintro:latest ``` -To build a single file (for example `index.qmd`), +To render a single file (for example `index.qmd`), ``` docker run --platform linux/amd64 --rm -u 1000:1000 -v ${PWD}:/qmd ghcr.io/nbisweden/workshop-ngsintro:latest quarto render index.qmd @@ -69,11 +69,11 @@ Go to [http://localhost:8800/](http://localhost:8800/) or [http://0.0.0.0:8800]( ```bash # build container -docker build --platform linux/amd64 -t ghcr.io/nbisweden/workshop-ngsintro:2.4.0 -t ghcr.io/nbisweden/workshop-ngsintro:latest . +docker build --platform linux/amd64 -t ghcr.io/nbisweden/workshop-ngsintro:2.5.0 -t ghcr.io/nbisweden/workshop-ngsintro:latest . # push to ghcr # docker login ghcr.io -docker push ghcr.io/nbisweden/workshop-ngsintro:2.4.0 +docker push ghcr.io/nbisweden/workshop-ngsintro:2.5.0 docker push ghcr.io/nbisweden/workshop-ngsintro:latest # run container in the root of the repo diff --git a/dockerfile b/dockerfile index 7fef06f9..e3ea2dec 100644 --- a/dockerfile +++ b/dockerfile @@ -1,11 +1,11 @@ # DOCKER FILE FOR WORKSHOP-NGSINTRO # 2025 Roy Francis -FROM rocker/verse:4.4 +FROM ghcr.io/rocker-org/verse:4.4.3 LABEL Description="Docker image for NBIS workshop" LABEL Maintainer="roy.francis@nbis.se" LABEL org.opencontainers.image.source="https://github.com/NBISweden/workshop-ngsintro" -#ARG QUARTO_VERSION="1.6.40" +ARG QUARTO_VERSION="1.6.42" RUN apt-get update -y \ && apt-get clean \ @@ -19,9 +19,9 @@ RUN apt-get update -y \ #&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ #&& apt-get install -y ./google-chrome-stable_current_amd64.deb \ #&& rm -rf ./google-chrome-stable_current_amd64.deb \ - #&& curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb \ - #&& apt-get install -y ./quarto-linux-amd64.deb \ - #&& rm -rf ./quarto-linux-amd64.deb \ + && curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb \ + && apt-get install -y ./quarto-linux-amd64.deb \ + && rm -rf ./quarto-linux-amd64.deb \ && rm -rf /var/lib/apt/lists/* \ && install2.r --error --skipinstalled remotes fontawesome here htmlTable leaflet readxl writexl \ && rm -rf /tmp/downloaded_packages \ @@ -38,5 +38,9 @@ WORKDIR /qmd #ENV XDG_DATA_HOME=/tmp/quarto_data_home CMD ["quarto", "render"] -# docker build --platform linux/amd64 -t ghcr.io/nbisweden/workshop-ngsintro:2.3.0 -t ghcr.io/nbisweden/workshop-ngsintro:latest . +# local build +# docker build --platform linux/amd64 -t ghcr.io/nbisweden/workshop-ngsintro:2.5.0 -t ghcr.io/nbisweden/workshop-ngsintro:latest . +# multiplatform build and push to repository (doesn't work) +# docker buildx build --platform=linux/arm64,linux/amd64 -t ghcr.io/nbisweden/workshop-ngsintro:2.5.0 -t ghcr.io/nbisweden/workshop-ngsintro:latest --push -f Dockerfile . +# build singularity # docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/work kaczmarj/apptainer build ngsintro.sif docker://ghcr.io/nbisweden/workshop-ngsintro:latest