Docker image format

后端 未结 2 1698
北荒
北荒 2021-02-07 08:35

I would like to build a Docker image without docker iself. I have looked at Packer, but it requiers to have Docker installed on the builder host.

I have looked at the Do

2条回答
  •  误落风尘
    2021-02-07 08:55

    The Docker image format is specified here: https://github.com/docker/docker/blob/master/image/spec/v1.md

    The simplest possible image is a tar file containing the following:

    repositories
    uniqid/VERSION
    uniqid/json
    uniqid/layer.tar
    

    Where VERSION contains 1.0, layer.tar contains the chroot contents and json/repositories are JSON files as specified in the spec above.

    The resulting tar can be loaded into docker via docker load < image.tar

提交回复
热议问题