Are you planning on modifying the lemmy backed or UI? If not I would suggest:
Comment out the sections about building the image from scratch.
Go to dockerhub and find the newest tag that matches your system's architecture and use that instead.
If you can paste your docker-compose file we can more precisely tell you what needs to be changed.
The default config expects that your cloning the entire GitHub repo, for the backend, at least, and tries to compile it from scratch. You can instead just tell docker to use a precompiled image instead.
Lastly YAML is very picky about whitespace so something might be indented incorrectly. So again, if we can see your docker-compose file we might be able to see what's wrong.
But after the comment from @marsara9@lemmy.world I changed it to pull the image from dockerhub instead of building it myself. Now it pulls correctly and the server comes online but is almost unusable. The homepage displays but I cannot login as admin or create a new user :/
Have you edited your lemmy.hjson yet to ensure details match the docker-compose.yml? The instructions for that part are not very clear and I had to do lots of trial and error to get it working.
Also, @hyper@lemmy.ml, what does your nginx.conf look like? Now that the webpage is loading, the backend might be blocked/not configured properly in nginx, so nginx isn't properly forwarding requests to the backend.
2nd reply, can you also post the logs from the lemmy-lemmy-1, lemmy-lemmy-ui-1, lemmy-postgres-1, and lemmy-pictrs-1 containers?
I found most of my issues were dealing with communication between networks and IP's binding wrong which wont show anywhere but in the logs as connection issues.