Specifying docker run command through Docker Desktop GUI

I’m trying to help some students use the SageMath image with Docker Desktop under Windows 11. We want to use the sage-jupyter command as described on that page, and it works properly when I do

docker run -p8888:8888 sagemath/sagemath:latest sage-jupyter

from a cmd command prompt. However, I think the students would find it more convenient to start it from within the Docker Desktop GUI. Within the GUI, I can pull the image successfully, but if I just click the “play” button to run it, the sage-jupyter command isn’t passed and so I can’t use jupyter (nor indeed can I interact with the container at all). Is there a menu somewhere to specify the sage-jupyter command? It doesn’t seem to be in the Optional Settings dialog presented when you run the image for the first time.

The Docker Desktop UI is only for basic configurations and browsing. The command line interface is still required to be used. Maybe you could install the “Portainer” Docker Desktop extension and use its webinterface, but that changes how containers run.

I would highly recommend for your students to learn simple docker run commands, but you can still check Portainer and see if that helps.

Another solution could be that you create a new Docker image from the SageMath image, add a new entrypoint which reads the commands from an environment variable and tell your students to set the command in the variable you implemented.

Regarind ports (if that is also a question), if the Dockerfile contains the EXPOSE instruction to mark specific ports as used by the container, The Docker Desktop ui lets you map a host port to the exposed container port.