# Restart container within itself

**URL:** <https://forums.docker.com/t/restart-container-within-itself/31489>\
**Category:** General\
**Created:** [April 25, 2017, 4:49pm UTC](https://forums.docker.com/t/restart-container-within-itself/31489 "2017-04-25T16:49:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahabistestuser](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mahabistestuser](https://forums.docker.com/u/mahabistestuser)\
**Post date:** [April 25, 2017, 4:49pm UTC](https://forums.docker.com/t/restart-container-within-itself/31489/1 "2017-04-25T16:49:22Z")

</div>

Hello,  
I need to reboot on of our Ubuntu containers once a week, but from the container’s terminal I can’t do it.

> sudo reboot  
> shutdown: Unable to shutdown system  
> How can I reboot it?

Also, re-deploy would be OK, but is it possible to configure auto-redeploy on Docker Cloud?

Thanks

---

<div class="post-metadata">

**Author:** ![bryceryan](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/bryceryan/32/18353_2.png) [@bryceryan](https://forums.docker.com/u/bryceryan)\
**Post date:** [April 26, 2017, 4:25am UTC](https://forums.docker.com/t/restart-container-within-itself/31489/2 "2017-04-26T04:25:23Z")

</div>

Containers are not VMs, they are effectively processes (in one way of thinking). Thus, an OS restart within a container doesn’t make sense, and is therefore not possible. One kills, stops, or restarts containers, e.g.

docker stop CONTAINER  
docker kill CONTAINER  
docker restart CONTAINER

In the context of your question, and depending on the specifics of your container, it probably makes the most sense to restart the container in question.

---

<div class="post-metadata">

**Author:** ![mahabistestuser](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mahabistestuser](https://forums.docker.com/u/mahabistestuser)\
**Post date:** [April 26, 2017, 12:04pm UTC](https://forums.docker.com/t/restart-container-within-itself/31489/3 "2017-04-26T12:04:09Z")

</div>

@bryceryan thanks for the explanation.

---

<div class="post-metadata">

**Author:** ![virtimus](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/virtimus/32/54582_2.png) [@virtimus](https://forums.docker.com/u/virtimus)\
**Post date:** [February 21, 2026, 2:22pm UTC](https://forums.docker.com/t/restart-container-within-itself/31489/4 "2026-02-21T14:22:47Z")

</div>

Yeah ! That’s what i did - “docker restart “ is enough to restart the container from inside if you have docker socket mapped/ cli installed etc
