Split dockerfile into base and release layers.