Docker: combine docker layers into image

The origin of this question is that the pulling from docker private registry is super slow.

Then I figure out that the speed of wget through registry remote API is all right.

  • How to dynamically set environment variables of linked containers?
  • Can (should) Docker be used for winforms applications?
  • How to monitor for Java Exceptions externally?
  • Deploying Docker Data Volumes
  • Python docker-py Connection Refused
  • Docker: execute a program that requires tty
  • Now I get layers of one image. How can I load it as image to my docker daemon?

    ps:

    I tried docker load < layer.0, where layer.0 is the base image of all layers.

    And the result as following.

    FATA[0015] Error: open
    /home/docker/data/docker/tmp/docker-import-087506163/repo/etc/json: no
    such file or directory

  • DevOps: automatically restarting a failed container
  • Ansible deploys Docker container to wrong Vagrant VM
  • Connect to DynamoDB Local from inside docker container with boto3
  • Nginx doesn't get host from embedded DNS in docker 1.10.1
  • How to get dockerfile to evaluate environment variables I sent to it?
  • docker akka and scala, app start and stop just after without reason
  • One Solution collect form web for “Docker: combine docker layers into image”

    All layers are diffs you have to load them all for your “image” to be containerized. There is no single image file which contains all your layers. This is useful when you have many images with the same base image and the layers are shared. The only way to compress the layers into a single image is to run a container and export it into a tarball and them import it into a new image and deploy that to dockerhub or your repository.

    See Solomon Hykes comment for source.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.