You Should Learn Docker Before Buying a NAS (Here’s How)


NAS (network attached storage) provides a safe place for your files that can be accessed from anywhere. While fun to set up, once a NAS is configured, it just sits and boringly does its job. With Docker, you can turn your NAS into an ongoing project that can do much more than just store files.

What Is Docker, and What Does It Do?

Docker is a software platform that runs other apps in containers. Containerized apps include all the code and dependencies required to run in an isolated environment on another system. Basically, it takes everything needed to make an application run and bundles it up so that it can be run on anything else that can run Docker.

This makes it easier for software developers to build applications in a consistent way that they know can be run anywhere without having to worry too much about how users have their own systems configured. As a result of this, it also removes a lot of the frustrating setup processes for end users, especially for apps with a lot of dependencies.

Docker and Your NAS

Docker is a boon for NAS users as many NAS devices let you run your own software on them using it.

This opens up a huge array of possibilities, from turning your boring but reliable old NAS into a home media server or home automation hub to hosting your own cloud services (like online office suites), file sync tools, or even running your own private Minecraft server.

Learn Docker From the Safety of Your Desktop

Docker is designed as a software development tool and a tool for system administrators to deploy software to their infrastructure. That doesn’t make it difficult to use, but it does mean there’s a bit of a learning curve, and most tasks require using Docker from the command line.

Docker Desktop includes everything required to run Docker and provides a user-friendly graphic interface for some common tasks like stopping and removing containers. You’ll still be using the command line a lot, but you’ll be able to use Docker Desktop to see what’s going on and change settings, easing you into things.

Once you’ve installed Docker Desktop (see the Docker documentation for installation instructions for Windows 11, MacOS, and Linux), you can start getting familiar with the Docker terminology around finding, downloading, and running apps. The most important concepts in Docker are images, containers, volumes, and ports.

Docker images are packages that bundle all the files and configuration for an application into one file that is used as a template for running containers. Images are pulled (downloaded) from a Docker registry.

Containers are launched from these images, creating a separate environment that runs on your PC with access to all the resources in the image. When a container is removed, that environment and any changes in it are destroyed. Volumes allow you to store files outside the container (in a directory on your PC), so that they survive these temporary environments.

Ports are used to access services in the container and can be mapped to different ports on the host (for example, mapping a web server running on port 80 in the container with port 8080 in the host to avoid conflicts with other running web servers).

There’s lots more to Docker, but understanding these basics allows you to configure apps that are accessible and that store their files outside the container so that they aren’t deleted when the container is removed.

Running Your First App With Docker

A great way to test out your Docker Desktop environment (and your newfound Docker know-how) is by running IT Tools, a neat little collection of apps for techies, including a QR code generator, text encryptor, date/time converter, emoji picker, more.

To install IT Tools, run the following Docker command from the Linux or MacOS Terminal or PowerShell if you’re on Windows:

docker run -d -p 8080:80 --name it-tools corentinth/it-tools

When you run this command, Docker will download the application image (pulling it) from the default registry if it doesn’t exist locally.

The Docker command line tool pulling an image to be run in a container.

Docker will run the app. In this case, it launches the image corentinth/it-tools in a container named “it-tools”, and maps port 80 from the container to port 8080 on your computer so that it can be accessed at the address http://localhost:8080. The -d (for “detached”) option tells the container to keep running in the background when the command is completed.

Docker Desktop showing a running container.

Et voila! You’ve just run your first Docker app and demonstrated how port mapping works. You can see the IT Tools container is now running in Docker Desktop, where you can stop/start it and see what’s happening inside the container environment.

Docker Desktop showing the details of a running container.

Choosing the Right NAS With Docker Support

Not every NAS lets you run apps using Docker, and some provide better support (including user interfaces for easier management) than others, so make sure you choose a NAS with the features you need. You should also check that your chosen NAS has a powerful CPU and plenty of RAM if you plan on having it do any heavy lifting.

You can also build your own NAS from a spare PC and some spare hard drives using TrueNAS Scale. This free Linux-based OS includes everything you need to configure a NAS with standard features like RAID and a web interface. TrueNAS Scale can also host virtual machines and includes support for a number of official apps, as well as support for custom Docker apps.

The Best Docker Apps To Get Started With on Your NAS

Once you’ve paired your new Docker skills with a suitable Docker-supporting NAS, you can start experimenting with different apps.

Jellyfin is a great way to start, giving you your own Netflix-like media service for your own home movies, and NextCloud will give you your own private cloud services, free from the grasp of big tech companies. If you need a web interface for Docker, check out Portainer (which, itself, can be run from Docker). Have fun!



Source link

Previous articleThis Flappy Bird Clone Runs in Your Browser’s Page Icon
Next articleApple Store goes down ahead of iPhone 16e preorders