I decided to touch the Docker-technology to launch applications and in the process of reading a question appeared.

In some githaba repositories I saw that the authors split the project into a docker image and just code (like, mysite.git and mysite-docker.git). Is it reasonable?

  • Please divide this question into several different questions. This will help provide answers that are helpful to more people. - Mikhail Vaysman
  • @MikhailVaysman is done. - while1pass
  • Launching a site from a Docker VS image launch with traditional tools (uWSGI, Nginx, Apache) .stackoverflow.com / questions/611961/ … - while1pass
  • Running Docker images on the combat server. Stackoverflow.com/questions/611957/… - while1pass
  • The difference between the terms “layer” and “container” in Docker ru.stackoverflow.com/questions/611953/… - while1pass

1 answer 1

This separation is usually done so that the images are automatically collected and laid out in the registry on docker.io. In Docker Cloud, you can configure automatic image collection when a repository changes to Github / Bitbucket.

If the repository for the project and for the docker image is the same, then each push will start building a new docker image. And this may not be desirable.

  • And if you do not collect from any branch, but only from the release? - Nick Volynkin ♦
  • Yes. You can customize the build from a specific branch or tag. - Mikhail Vaysman
  • one
    it often happens that a project is done by one, and the image is another person, and therefore it can be distinguishing. but it's enough just to find out by looking in the dockerfile. images are usually stored in the docker.io registry repository. - Mikhail Vaysman
  • one
    @ while1pass did not meet any special recommendations. There are recommendations for tags, but this is a bit wrong. - Mikhail Vaysman
  • one
    @ while1pass slash in the name may indicate that this image will not be uploaded to the docker.io registry, but some other one, it may also indicate the name of the user who created this image. For example, one of my images is called vaysman / dnsdock: 1.0 and you can download it from docker.io using this particular name. - Mikhail Vaysman