Merge two docker images

前端 未结 3 1277
失恋的感觉
失恋的感觉 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:02

    You can't just merge the images. You have to recreate your own based on what was in each of the images you want. You can download both images and re-create the Docker files for each like this:

    docker history --no-trunc=true image1 > image1-dockerfile
    docker history --no-trunc=true image2 > image2-dockerfile
    

    Substitute the image1 and image2 with the images you want to see the history for. After this you can use those dockerfiles to build your own image that is the combination of the two.

    The fly in the ointment here is that any ADD or COPY commands will not reveal what was copied because you don't have access to the local file system from which the original images were created. With any luck that won't be necessary or you can get any missing bits from the images themselves.

提交回复
热议问题