Skip to content

4.Docker

Lola-W edited this page Jan 20, 2023 · 8 revisions

Objective: Create Docker image, download packages and Rnotebook

Time estimated: 1 h; taken 2 h;

Date started: 2023-1-18 ; completed: 2023-1-20


Dockerfile

  • Task: Create own Docker image

  • Download additional libraries

    • Use a txt file, Dockerfile

    Error, can’t open DockerFile
    Solution, DO NOT use other name, just Dockerfile

    FROM risserlin/bcb420-base-image:winter2023
    
    #Install DESeq2
    RUN R -e "BiocManager::install("DESeq2")'
    
    #Install pheatmap
    RUN install2.r \
        -d TRUE \
        -r 'https://cran.rstudio.com' \
        pheatmap
  • Create a container with Dockerfile

    cd /Users/wengjiaming/Documents/BCB420
    docker build -t mybcb420 .
    #name the docker mybcb420
  • Run the new Docker

    docker run -e PASSWORD=changeit --rm \
      -v "$(pwd)":/home/rstudio/projects -p 8787:8787 \
        mybcb420

basic RNotebook

💡Conclusion and outlook: Set up Docker image, note that the name of Dockerfile is important, created the RNotebook and push it to git.


References

  1. Docker
  2. Steipe B. and Isserlin R. (2023) R - Basics. https://bcb420-2023.github.io/R_basics/index.html
Clone this wiki locally