I’m using: SWI-Prolog version 64 bits, version 8.1.16-22
I want to deploy my Prolog http server as a docker container. I have created a main.pl script, which loads all dependencies and predicates and starts prolog http server. When I do it locally it works fine. When I am trying to do it trough docker, it starts and it loads everything successfully, but when it runs trough all the lines it just exits with code(0), I was wondering is there a proper way to start a prolog script from terminal? So it would not exit when it runs trough code?
:- set_setting(http:cors, [*]). server(Port) :- get_base_location_atom(Base), atom_concat(Base, '/cert/server.pem', Server), atom_concat(Base, '/cert/private_key.pem', PrivateKey), http_server(http_dispatch, [ port(Port), ssl([ certificate_file(Server), key_file(PrivateKey), password("XXXXXXXXXXXX"), peer_cert(false) ]) ]).
CMD [ "/root/bin/swipl", "main.pl" ]