So, the issue you mentioned occurred during the second build?
I'm not sure of the cause, it could be an issue during the build somewhere. If it's still not working, you might want to share all the build logs, or just go with the docker image, at least you don't have to build it again.