Skip to content

Commit

Permalink
Updated docker image. Updated quarto, added new R pkgs for updated lab.
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Mar 6, 2025
1 parent 0f1ae39 commit 56bed77
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
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 \
Expand All @@ -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 \
Expand All @@ -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

0 comments on commit 56bed77

Please sign in to comment.