# Raw services or in containers?

**URL:** https://dietpi.com/forum/t/raw-services-or-in-containers/6111
**Category:** General Discussion
**Created:** [26 December 2021 13:27 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111 "2021-12-26T13:27:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![miguelpruivo](https://dietpi.com/forum/user_avatar/dietpi.com/miguelpruivo/32/8837_2.png) [@miguelpruivo](https://dietpi.com/forum/u/miguelpruivo)
#### Post date: [26 December 2021 13:27 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/1 "2021-12-26T13:27:36Z")

</div>

Hi! I’ve been using my pi4 with diet-pi for a while now and I mostly use it for:

- plex;
- pihole;
- sonarr, radarr, NzbGet;
- homebridge;
- vpn;

And some other minor services every now and then. They’re all running purely and directly on the diet-pi image and I’ve been wondering what advantages would I have on using each service on its docket container. Will I gain any benefit?

Thank you!

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [26 December 2021 13:33 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/2 "2021-12-26T13:33:36Z")

</div>

Not really as your system need to deal with the overhead of the Docker runtime. As well Docker will become a single point of failure. Because if Docker fails to start, all your services will be offline at once. If there is no specific need, you are fine to run your apps natively without Docker.

---

<div class="post-metadata">

### Author: ![miguelpruivo](https://dietpi.com/forum/user_avatar/dietpi.com/miguelpruivo/32/8837_2.png) [@miguelpruivo](https://dietpi.com/forum/u/miguelpruivo)
#### Post date: [26 December 2021 15:24 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/3 "2021-12-26T15:24:40Z")

</div>

Thank you, that’s what I thought. However, I’ve been wondering what would be a reliable way to backup my services (for example, if i need to replace/format my OS without losing service states).

Also, sometimes my dietpi freezes and I lose access to all my services which is terrible. For example, right now, I’m out of my hometown and I lose access to plex and my services because some point of failure which I’m yet to discover what is causing it — opened a thread regarding this [here](https://dietpi.com/forum/t/headless-rpi4-freezing/6089/1)

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [26 December 2021 22:13 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/4 "2021-12-26T22:13:26Z")

</div>

well if your system if freezing with current service, same might happen with Docker as it im impacted by same issue than.

---

<div class="post-metadata">

### Author: ![DietMeow](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/ed655f/32.png) [@DietMeow](https://dietpi.com/forum/u/DietMeow)
#### Post date: [15 July 2023 07:36 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/5 "2023-07-15T07:36:28Z")

</div>

According to the research paper in this SO post, Docker is very efficient and is close to bare metal performance because it’s not a true VM but rather isolator of name spaces.

[linux - What is the runtime performance cost of a Docker container? - Stack Overflow](https://stackoverflow.com/questions/21889053/what-is-the-runtime-performance-cost-of-a-docker-container)

---

<div class="post-metadata">

### Author: ![jcw](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@jcw](https://dietpi.com/forum/u/jcw)
#### Post date: [15 July 2023 11:23 UTC](https://dietpi.com/forum/t/raw-services-or-in-containers/6111/6 "2023-07-15T11:23:23Z")

</div>

Allow me to _gently_ push back on the “docker as single point of failure” note. That’s also the case for things like ssh, web server(s), and linux in general. In the end, many things can go wrong in various ways and with various levels of severity. If things work out of the box **AND** only well-tested updates are applied **AND** no major config changes are made, a system will continue to work just fine. Hardware may wear out or break, but software doesn’t - not from just using it as is, anyway.

Docker is “an extra layer”, which adds complexity (under the hood) and may affect performance.

But “simpler” is not the only metric: e.g. if you need the extra functionality or want to handle more scenarios. Another aspect is how well software is maintained, especially in the long run. Both DietPi and Docker pass with flying colours in this respect, AFAICT. As for the “apps”, that can vary wildly.
