Sharing docker container

I’ve multiple docker containers that have been modified via file system updates. These updates are not represented via changes to the dockerFile

This is pseudo code for process :

  • Docker /var/lib/docker/devicemapper/devicemapper using 2.7GB
  • Port unreachable after deploying NGINX image to IBM Bluemix Container Cloud
  • Docker swarm with nginx as cache: 502 bad gateway
  • Destination Host Unreachable while communicating between container using consul in docker overlay network
  • How does one use Apache in a Docker Container and write nothing to disk (all logs to STDIO / STDERR)?
  • How to view netstat of a container within another container?
  • docker pull image
    docker run image
    docker exec -it <image_id> bash
    'make changes to running docker container image
    exit running docker container
    docker commit <new container name>
    

    To save the container I can use docker save... and a local copy of container is saved. Can the be pushed to the registry ? Or is registry just for images and not containers ?

    Is the single method of sharing a custom docker container to export it as .tar file and then re-import on other machine ?

  • Docker Quickstart Terminal: exit status 255
  • Vagrant multi-machine with docker tries to create two boot2docker vms
  • Docker stops previous running container with the same image. Why?
  • Unable to create a thinpool in Debian
  • Docker Volume vs AWS s3
  • Allow docker container to connect to a local/host postgres database
  • 2 Solutions collect form web for “Sharing docker container”

    You never share containers, you always share images. The docker commit command that you’ve already used does not save a container, it creates a new image from that container’s file system (documentation):

    Create a new image from a container’s changes

    Usage

    docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
    

    You can treat an image created by docker commit like you would any other image (create new containers from it, push it to registries, etc.).
    Simply create a new image by committing an existing container, and you can push that image anywhere you want:

    $ docker commit <some-running-container> yourusername/new-image
    $ docker push yourusername/new-image
    

    If you do not want to use a registry, use the docker save command to export an existing image into a file, and the docker load command to import the image again.

    $ docker commit <some-running-container> yourusername/new-image
    $ docker save yourusername/new-image > new-image.tar
    $ # On another machine:
    $ docker load < new-image.tar
    

    I dont know if there is any registry exists for sharing containers. Even if there is, it would be against philosophy of docker. I cant think of a use-case where sharing images would fail but containers will succeed. Images are meant to be shared (platform independent) and containers (platform specific) will be created from those images.

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