Version Control In Docker
What
By using docker , we can easy deploy the application. but how we control the deploy version and how can we rollback to last version if any error occur?
There is the solution we explore in development.
How
To control which version docker image need to deploy to prod. we need to defined the target ‘sign’ for our docker image, something like: “master”, “prod”.
To rollback to the image we want. all image need to have a ‘sign’ for rollback , something like: “2021-01-01 10:00:00 - asdffe”, “release date + commit id”.
so we need to push two image to docker repo: master
image and release date + commit id
image.
master image will overwrite old image all the time. the release date + commit id
image will be saved in repo for rollback
Code
1 | TAG = date + commit id |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 JIE's Blos!