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.