/e/OS on Samsung Galaxy J5 2017

You probably can build for Oreo, something is just wrong in your build environment.

First, try to build for an officially supported device by /e/ and LineageOS on Oreo to see if it works by following the documentation :
https://doc.e.foundation/how-tos/build-e
Or manually with the help of this script :

(Start from scratch, it helps)

Personally I prefer to build without docker.