Run command from .bashrc in detached docker container

I'm running a docker container in detached mode, and I'm having difficulty running a command that's in the container's ~/.bashrc.

Inside the docker container's ~/.bashrc:

labserve () { jupyter lab --ip=0.0.0.0 --allow-root --no-browser --NotebookApp.token='' }

If I start the container with

$ docker run -d image -p 8888:8888 --name jupyterbox

I'd like to be able to tell the image to tell the detached container to open up jupyterlab with the following command:

$ docker exec jupyterbox bash -c labserve

however, when I do that, I get the error

bash: labinit: command not found

On the other hand, if I do

$ docker run -it jupyterbox bash root@4e344655fc31:/home# labserve

The command runs correctly, and opens up a jupyterlab within my docker container running on port 8888.

How do I exec this command in a detached container?