How to use Docker to make releases? -


some time ago did interview company , mentioned apps packaged docker. said when modify application not commit code entire image. release consists in push of commit git (?).

i didn't have chance ask more details, not sure meant...

option 1:

they put dockerfile in source tree somewhere , commit , script copy compiled application in right dir (we're talking java).

option 2:

they commit whole image (?). i'm not familiar structure of docker images, binary or big directory tree distribution files (plus config app, etc...).

or else... don't know docker enough.

obviously don't want put sources in images , committing entire distribution in git seems bit overkill me...

i think somewhere between option 1 , 2:
when of developers in team pushes code, sort of ci/cd tools jenkins might create docker container using base docker image (may pull docker image directly or create image using dockefile) , java compilation on container. @ point, if image built, dockerfile responsible create image might git pull or add or mounted using volume , compile java project. alternatively, if base image there basic environment setup, java source code may have been added using volume or using dockerfile referencing base image , using add or doing git pull create new image , creating container, code compiled. also, separate data containers containing data may needed test. same container may passed along other environments, qa or pre-prod unit-testing , integration testing (totally depends on design). if tests passed, ci/cd tool may commit container create new image, tagging them release. same image (with particular tag) used deploy container in production.
now, mentioned, dockerfile may committed somewhere in source tree or may belong different repo, responsible deployment.
docker images may tied build pipeline , tagged accordingly, revert changes when necessary.
there many ways integrate docker in releases.
may refer these posts further investigate how people using docker in production:
1. https://stackoverflow.com/a/18287169/2167517
2. docker container management in production environment
3. creating docker uat/production image
hope helped extent. simple use case, sure people using elegant design docker in production.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -