Nathan,
It works to some extent: When I do
docker run -it --name bla sagemath/sagemath-dev:latest /bin/bash
then (after waiting for some time because apparently the docker image
does some compilation of Sage before doing anything else) I am indeed in
a bash in docker - and stay there, interactively, which is not what I
want.
I.e., I need to leave with ctrl-p and ctrl-q, and then I can execute
commands in that container (such as
docker container exec bla sage -i meataxe
)
How can I start/run the container so that I don't need ctrl-p and
ctrl-q? After all, I want to use the container with a script, not
interactively. I tried the option "-dit", but then I don't know (and the
script doesn't know) how long I need to wait until the preparatory steps
of the container are done. Right after
docker run -dit --name bla sagemath/sagemath-dev:latest /bin/bash
the command
docker container exec bla sage -c "print('Hello')"
fails, because "sage.all" is not there yet:
Traceback (most recent call last):
File "/home/sage/sage/src/bin/sage-eval", line 4, in <module>
from sage.all import *
ImportError: No module named sage.all
The same command works after waiting long enough.
Best regards,
Simon