Must the kernel match between the release build environment and the deployment environment?

I am deploying to an OpenVZ VPS running 16.04.2 x86_64, but because it is hosted in an OpenVZ VPS, it is running kernel 2.6.32-042stab113.21.

I created a Ubuntu 16.04.2 x86_64 docker container to build my release of a phoenix app and I think I finally got the release build process working. When I try to start the server on the VPS host, it coredumps. The docker environment is running a “4.9.13-moby” kernel

Do the kernels need to match between the release build environment and the deployment environment?

I’m just guessing, but I suspect your problems are Docker related. Docker containers run whatever kernel is installed on the machine running the docker containers. Generally this isn’t a huge problem, but if there are specific kernel features that the software in the container requires you can see problems like this.