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 :

  • RSelenium on docker: where are files downloaded?
  • Error creating default \“bridge\” network: cannot create network (docker0): conflicts with network (docker0): networks have same bridge name
  • Manipulating network traffic between containers in Docker in Docker environment without privileged mode?
  • View dockerFile associated with tag
  • Docker - Rstudio - R old version running together
  • Docker Stack deployment app does not work
  • 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 ?

  • How to connect local kafka in docker container?
  • Pulling images from private registry in Kubernetes
  • Mesos cannot deploy container from private Docker registry
  • Simple script needed to delete all docker images older than 4 weeks
  • How to cache the RUN npm install instruction when docker build a Dockerfile
  • Explanation of the “--upgrade add” command for Alpine Linux
  • 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.