DEV Community

HazTechyContent
HazTechyContent

Posted on

Cool SHIT you can do with docker

Docker is the most revolutionary tech when it comes to containerization. Mainly because it’s fast and ensures that the app runs flawlessly in different environments with zero configurations (or minimal configuration depending on the needs).

In this blog we are going to discuss the different ways you can use docker for your homelab.

Reader Note: This blog is arranged in the sequence of more commonly used to more advanced and interesting things you can do with docker.

What is a homelab?

If you are new to concept of the homelab then to explain it simply it just a server running on your private network (you can also assign a domain to it) to host services like pihole, ad guard (both of which blocks ads), nextcloud (to host your own cloud server), jellyfin (to create your own youtube or media server) et cetera. Most of these will be discussed in this blog. So LET’S get right into it:

Downloading Docker:

Obviously you have to install docker for doing any of the below

1. Choose Your Operating System:
Docker supports Windows, macOS, and Linux. Visit the official Docker website (https://www.docker.com/) to select your OS.
2. Download the Installer:
Click the “Get Started” button and follow the on-screen instructions to download the appropriate installer for your system.
3. Run the Installer:
Double-click the downloaded installer file and follow the prompts to install Docker.
Note: On Windows, you might need to restart your computer after installation.
4. Verify Installation:
Open a terminal or command prompt and type docker --version. If Docker is installed correctly, you should see the installed Docker version.

Additional Considerations:

Docker Desktop: For Windows and macOS, you might be prompted to install Docker Desktop, which includes Docker Engine, Docker Compose, and Kubernetes.
WSL2 (Windows Subsystem for Linux): On Windows, you might need to enable WSL2 for optimal performance.
Rootless Mode: For added security, consider using rootless mode, which allows you to run Docker without root privileges.
Remember: Always refer to the official Docker documentation for the most up-to-date instructions and troubleshooting tips.

Reader Note: All of these can be done with your personal that you use everyday however it is more recommended that you use a seperate pc (it can be your old potato pc or an old laptop) or a raspberry pi if you have one.

Another Note: I recommend you using docker compose files to create the container mainly because everthing is better organized when you use docker compose

Extra Resources:

One last thing before getting into the cool stuff is that you should be familar with linux file system and docker (click on them to go to the linked videos)

1. Nextcloud | you personal Google drive:

I have seen people who use google drive or google photos to store their memories and important work which eventually run out storage. When that happens you only have two choices either delete some of your data or pay for extra storage. This is where nextcloud comes in.

Nextcloud is like google workspace but self hosted and opensource. It has the following features:

  • Nextcloud Office (optional)
  • High performance backend for Nextcloud Talk and TURN-server (optional)
  • Nextcloud Talk Recording-server (optional)
  • Backup solution (optional) -Imaginary (optional, for previews of heic, heif, illustrator, pdf, svg, tiff and webp)
  • ClamAV (optional, Antivirus backend for Nextcloud)
  • Full text search (optional)
  • Whiteboard (optional)
  • Docker Socket Proxy (optional) If you do the math the “Basic” google subscriptions costs “1.99” which is about 20$ yearly and with that amount of money you can get a new 1 terabyte hard disk (it may cost more but it will definitely pay off in a year or two)

You can find the download guides it here or if you are a dummy like me here is a video for you.

2. jellyfin | your own media server:

Let’s say you have a lot memories and movies (pirated, hope I’m not the only one!) and you want to access from anywhere in the world (or your home network) without plugging a USB in the back of your TV then you can use jellyfin.

You can find the instructions (to download and use it) here.

Or if you want to locally on your windows or mac machine (with no involvement of docker) you can view the instructions here.

Reader Note: Ususally there are two versions of docker images one by linux server (which I highly recommend you to visit for more cool stuff) and other is officially by the creators themselves however the configuration of linux server docker images are different.

3. Affine or obsidian | host your own notetaking app:

Ever wished that you had access to your notes form anywhere without paying a scent while also not giving your data to a ‘sus’ company which uses that data to make money (by selling it) and give personalized ads and also train some AI model (to all the programmer write bad open source code to poison the AI models’ training).

Then Hosting your very own note taking app is the best option. This is useful because if you are a person like me who uses multiple devices then you can access that (note taking) app from your browser.

Two of the most popular open source note taking app are affine (basically notion but open source) and obsidian (which stores notes in markdown).

Both of these have pros and cons like obsidian has a learning curve while affine is easy to use (almost like notion at this point). Affine stores data in a database while obsidian stores data on you pc in markdown file (which is easier to backup and setup).

Here is a video tutorials to help you get started with obsidian

A video on how to get started with obsidian

4. Locally Hosted AI models

Lets say that you have no internet or chat GPT is not currently up and running (mainly due to high demand) and you desperately need it. Then running an AI model locally on your computer is the best option. If you didn’t knew that was possible then you’ll have a working proof of this after reading this.

Reader Note: Although it will work on windows it is recommended that you run it on a linux OS like debian or ubuntu or wsl linux (use kali linux with kex for a GOATed wsl linux experience but not for this AI hosting stuff).

So what you need to do is go to this github repo and run the docker compose file (shout out to @WolfgangsChannel on youtube who made it)

To integrate it with your code editor you can use use the continue plugin (click to see the full docs).

If you want a video tutorial then here is a video by @WolfgangsChannel and here is a video by Network Chuck

5. Pi-hole | block ads and speed up internet

Some people don’t have access to very fast internet. To increase your internet speed there are only three ways

  • Change the DNS server
  • Contact your ISP and upgrade it
  • Use an ad blocker

But the problem with ad blockers is that most websites have ad blocker blocker that prevent you from using it.

So to solve this problem there is Pi Hole. How it works is that it acts like a DNS server but blocks all the ad sites and trackers making browsing on the internet much smooth. Also you can block websites with it.

Here are the download guides

Reader Note: A DNS server is recommended to run all time so you should definitely install pi hole on a Raspberry Pi (mainly because it consumes less power) or any other machine that is ON 24/7.

6. Run virtual machines (I’m not joking)

It just runs virtual machine that you can access over your private network. That’s all what it is. Here is a link to a kali linux docker image. Personally I find the idea of accessing virtual machine from any device on the private network to be quite cool 😎.

7. Libre Office | microsoft office but Open Source

Microsoft office is expensive and not every one can afford it. There are some online alternatives like google docs or google sheet but they along with other harvest our data. So to solve this problem we have libreoffice. Its a great alternative to microsoft office.
Here are the download quides

Reader Note: There is another version of libre office that runs on the machine with no need of docker. If you want it click here.

8. Danger Zone

Danger Zone is software that scans file for viruses in a sandbox (can’t interact with the out side). This is useful if you want to open a pdf (because you are curious) but also don’t want your computer to get infected by viruses. Click here to view the guides.

Reader Note: When you click download danger zone for windows it will download a .msi file and you have to run it and it will install in docker (I’m telling this so you don’t get confused)

That's it for today guys hope you like it. It took a lot of effort and back and forth to write it. If you have any questions leave them in the comments and please follow for more content like this.

(also this blog was posted by me on medium. click here)

Top comments (3)

Collapse
 
deezzzi profile image
deezzzi

Thanks for sharing , this good dude.

Collapse
 
haztechycontent profile image
HazTechyContent

At your service bro

Collapse
 
chesedgamesonline profile image
ChesedGamesOnline

Very good