I'm stuck on a strange question:
Should we fix version of installed package? Could it be possible that some major version became incompatible with my php code?
Exemple: I install theses packages on each build on my docker:
apt-get install git
apt-get install zip
apt-get install unzip
apt-get install zlib1g-dev
could it be possible one day, that a new major major version happen and is not compatible with my application code executed by php-fpm?
First you listed packages like git
, zip
, etc. How do you intend them to become incompatible with your code?
Second, of course, the day will come that new compiler will warn on your code having deprecation stuff used. But that has nothing with docker
. Docker is containerization technology, it doesn't care about keeping your code up-to-date.
If you are talking about upgrading of existing components after downloading docker image - that would probably worth doing.
In general approach could be following: in your development process you use latest (upgraded) images and tools for your master
development branch, but as soon as you make releases, you tag
them, and for them it could be useful to make a snapshot of all used tools , including docker images, to be able in future to reproduce them.
For example we use ubuntu:latest
images for master
branches and for released versions we use versioned images like ubuntu:19.04
, also making a backup of an image to be safe in case it will be removed from public registry.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.