Create a docker image/container from EC2 AMI

后端 未结 3 452
旧巷少年郎
旧巷少年郎 2020-12-25 13:17

I am very new to docker and am trying to import my AWS EC2 AMI into a docker image. The image is a m2 linux image.

I have also setup a private docker hub(artifacto

3条回答
  •  再見小時候
    2020-12-25 13:30

    Docker can create an image from a tar file using the docker import command. From the documentation:

    Usage: docker import URL|- [REPOSITORY[:TAG]]
    
    Create an empty filesystem image and import the contents of the tarball 
    (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then optionally
    tag it.
    

    So you should be able to create a tar archive from your AMI image and then feed that to docker.

提交回复
热议问题