Deploying an Ubuntu 16 release to Ubuntu 18 - caveats?

Hi!

I’m working on a system upgrade from Ubuntu 16 to Ubuntu 18 for a client (with Ansible / Vagrant VMs etc). This group of machines includes a Phoenix app.

While doing my tests, I noticed that the Phoenix release (created with Distillery, on a Mac, using Docker and targeting Ubuntu 16.04) apparently works as is on Ubuntu 18 when deployed in a Vagrant VM.

Until now I believed that I would have to use the exact same Ubuntu version to ensure the app would start.

I would love to better understand that part ; are there caveats to keeping things that way for simplicity? Or is it better to strictly stick to the same version number when building from Docker?

Thanks!

– Thibaut

There’s nothing actually checking the os or anything like that when you start a release. It’s more like releases expect certain files in certain places, which are to be talked to in certain ways (mostly around nifs, statically linked libraries, abi’s, …). The ones your release uses might match between e.g. an Ubuntu 16.04 and 18.04 or not. You’ll likely only notice the case of “not matching” once you try to use those dependencies and not necessarily when starting the release. So you likely want to build a fresh release.

Thanks! It seems safer and not too complicated, so I’ll go that road, perfect.

In case in helps some, the FROM clause in a Dockerfile can be an argument, so definitely useful for that topic.