# To stop binderhub after the image push in repository

**URL:** <https://discourse.jupyter.org/t/to-stop-binderhub-after-the-image-push-in-repository/17446>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** how-to, help-wanted\
**Created:** [January 5, 2023, 9:38am UTC](https://discourse.jupyter.org/t/to-stop-binderhub-after-the-image-push-in-repository/17446 "2023-01-05T09:38:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lokeish\_Desaichetty](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/lokeish_desaichetty/32/8832_2.png) [@Lokeish\_Desaichetty](https://discourse.jupyter.org/u/Lokeish_Desaichetty)\
**Post date:** [January 5, 2023, 9:38am UTC](https://discourse.jupyter.org/t/to-stop-binderhub-after-the-image-push-in-repository/17446/1 "2023-01-05T09:38:09Z")

</div>

So my use-case is to use the binder-hub to convert the GIt repository of notebooks to image, currently I’m able to push the image to repository and able to spin up the kubernetes pod.

But i don’t want to spin up the kubernetes pod and the binder-hub should exit once the image gets pushed into the repository.

Can anyone suggest, how to do this? is there any settings already available.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [January 5, 2023, 5:22pm UTC](https://discourse.jupyter.org/t/to-stop-binderhub-after-the-image-push-in-repository/17446/2 "2023-01-05T17:22:42Z")

</div>

In theory you could write a custom JupyterHub spawner that just returns an error instead of launching a server, but that’s not very user friendly.

BinderHub uses a command-line tool repo2docker to build the images:

> **[GitHub - jupyterhub/repo2docker: Turn repositories into Jupyter-enabled...](https://github.com/jupyterhub/repo2docker)**
>
> Turn repositories into Jupyter-enabled Docker images - GitHub - jupyterhub/repo2docker: Turn repositories into Jupyter-enabled Docker images

You might be better off using that instead?
