There are a few questions about sending arguments to a command invoked with docker exec, but I'm struggling to translate the answers into something that works for my particular case, which is calling interactive SQL (isql) inside the container.
When I try:
docker exec -it virtuoso ../bin/isql $HOSTNAME dba dba ./rdf_inputs/insert_my_stff.isql
it shows that isql is invoked but somehow the parameters are all mixed up because it does not execute the insert_my_stuff ISQL script.
I tried putting the command all in quotes per the below but this does not help: passing arguments to docker exec from bash prompt and script
docker exec -it virtuoso sh -c "../bin/isql $HOSTNAME dba dba ./rdf_inputs/insert_my_stff.isql"
^ Also doesn't work.
If I manually exec into the container and execute:
../bin/isql $HOSTNAME dba dba ./rdf_inputs/insert_my_stff.isql
it works perfectly.
docker execdebugging tool here, or can you run this command directly from the host system? You'd need theisqltool available locally, plus the file you're trying to load, and if you're trying to connect to the database running in the container ($HOSTNAMEislocalhost) it'd need published ports, but it's still probably a simpler setup on the whole.