Docker: updating image and registry

What is the right workflow of updating and storing images?

For example:

  • Two docker container need volumes from each other
  • Building a Docker Image results in error while trying to install libwww-perl i.e., perl-modules_5.14.2-6 and perl_5.14.2-6 Not found
  • What is the proper set up for Maven to communicate with Docker daemon on Mac?
  • Docker cannot link to a non running container - fixed with a reboot
  • unexpected “permission denied” with 3.13 host
  • Curl command to install docker-machine and/or docker-compose does not work in Ubuntu Xenial
    1. I download source code from Github (project with Dockerfiles, docker-compose.yml)
    2. I run “docker build”
    3. And I push new image to Docker Hub (or AWS ECR)
    4. I make some changes in source code
    5. Push changes to Github
    6. And what I should to do now to update registry (Docker Hub)?

    A) Should I run again “docker build” and then push new image (with new tag) to registry?

    B) Should I somehow commit changes to existing image and update existing image on Docker Hub?

  • Multiple docker containers as web server on a single IP
  • How to Resolve Unable To Login Docker
  • Run apache in both host machine and docker container on 80 port
  • Docker: how to open ports to the host machine?
  • Docker Image HDP 2.5 - Hbase not connecting to Zookeeper (ERROR: Can't get master address from ZooKeeper; znode data == null)
  • Import cassandra schema script doesn't run in docker when using volumes
  • One Solution collect form web for “Docker: updating image and registry”

    This will depend on what for you will use your docker image and what “releasing” policy you adopt.

    My recommandation is that you sync the tags you keep on Docker Hub with the release/or tags you have in github and automate as much as you can your production with a continuous integration tools like jenkins and github webooks.

    Then your flow becomes :
    you do your code modifications and integrate them in github ideally using a pull request scheme. This means your codes will be merged into your master branch.
    Your jenkins is configured so that when master is changed it will build against your docker file and push it to Docker hub. This will erase your “latest” tag and make sure your latest tag in docker hub is always in synch with your master release on github

    If you need to keep additionnal tags, this will be typically because of different branches or relases of your software. You ‘ll do the same as above with the tag hooked up thru jenkins and github webhooks with a non master branch. For this lone, take a look as how the official libraries are organized on github (for exeample on postgres or mysql images).

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