Use keycloak cli with dockerized keycloak

I have Keycloak running containerized. I would like to use the admin CLI to import some users. I believe the docs say that I should shut down the keycloak server before using the cli to import/export users. How would I do that if I have keycloak running in a container?