reduce dockerfile layers to avoid buggy behavior.