Docker container not starting after rebuilding

I’m working on a project where I start all the services needed using what is essentially a docker-compose script (./docker-prebuilt-up.sh Line 24). This docker-compose command uses a YAML file (./pre-built.yml). Everything starts correctly by default. This includes the voter frontend I’m having trouble with later on:

$ docker ps | grep voter
9e6f8148bfb6   docker.pkg.github.com/alexscheitlin/master-project-evoting/voter_frontend:v2

But when I create a voter frontend image using ./voter-frontend/docker-build.sh using the same code that created the original image, it doesn’t start when I replace it
with ghcr.io/kevin-mok/voter_frontend:text in the YAML file (docker ps | grep voter produces no result unlike before). Why is this the case?

Also, running the default image yields:

$ docker run docker.pkg.github.com/alexscheitlin/master-project-evoting/voter_frontend:v2
ERROR: Unknown or unexpected option: -d -s build -l tcp://172.1.1.30:3000

And running my modified one yields:

$ docker run ghcr.io/kevin-mok/voter_frontend:text
file:///usr/local/lib/node_modules/serve/build/main.js:169
      const ipAddress = request.socket.remoteAddress?.replace("::ffff:", "") ?? "unknown";
                                                     ^
SyntaxError: Unexpected token '.'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
    at async link (internal/modules/esm/module_job.js:42:21)

That is to say, I don’t know how to run either with just docker run.

You can run my code by cloning my repository (linked in the
first sentence of this post), checking out the prebuilt branch and running ./docker-prebuilt-up.sh after setting up the prerequisites in the README.

Please do not just reference a link here. Its content can neither be indexed by the forum search, nor is there a guarantee the link will remain forever valid.

Furthermore, it will raise the chance that actually someone will look at it.

I posted the contents from the Stack Overflow question here. But as a new user, it only allowed me to post 2 links, so I had to remove a lot of the links which might have been helpful.