Merge two docker images

前端 未结 3 1282
失恋的感觉
失恋的感觉 2020-12-10 18:09

I\'m hoping to use docker to set up some bioinformatic analysis.

I have found two docker images that I would like to use:

  1. jupyter/datascience-notebook<
3条回答
  •  不知归路
    2020-12-10 19:03

    If there are specific files or directories that you want to cherry-pick from the one of the two images, you can create a new Dockerfile that builds FROM one of them and copy over specific paths from the other using COPY's --from option. For example:

    FROM bioconductor/devel_base
    COPY --from=jupyter/datascience-notebook /path/to/something-you-want /path
    

    However, a quick investigation of those images shows that in this specific case there isn't a lot that can easily be cherry picked.

    Alternatively, you can just look at the original Dockerfiles and combine them yourself:

    • https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile
    • https://github.com/Bioconductor/bioc_docker/blob/master/out/devel_base/Dockerfile

    Fortunately they are both based one APT-based distros: Ubuntu and Debian. So most of the apt-get install commands should work fine if you pick either base image.

提交回复
热议问题