This article tends to make it easier for DevOps engineers to manage Docker and Docker containers, but I wouldnβt recommend following it unless you already know how they work.
Tutorial Details
Description | Configure Docker and Docker Containers with DockSTARTer in Linux |
Difficulty Level | Moderate |
Root or Sudo Privileges | Yes |
OS Compatibility | Ubuntu, Manjaro, Fedora, etc. |
Prerequisites | β |
Internet Required | Yes |
What is DockSTARTer in Linux?
To put it simply, DockStarTer is a script that assists you in installing and managing Docker, Docker compose, and Docker containers on your Linux system via TUI or CLI.
Note that it doesnβt come with any predefined configurations (like networks, volumes, hosts, etc.) for any of the Docker containers it supports.
However, it makes it much easier than the old way by automating the process of setting up and configuring the Docker environment so that users can run multiple containers in a matter of seconds.
It also includes features like updating and backing up containers. And while I was writing this article, it supported popular container management tools such as Portainer, Watchtower, Jellyfin, Syncthing, etc. (Click here to check the latest apps list)
How to Install DockSTARTer in Linux
DockSTARTer is available for most Linux distributions and can be easily installed (including Docker and Docker compose) via the following methods:
Debian, Ubuntu, Pop!_OS, etc.
$ sudo apt install curl git -y
$ bash -c "$(curl -fsSL https://get.dockstarter.com)"
$ sudo reboot
Red Hat, Fedora, CentOS, AlmaLinux, etc.
$ sudo dnf install curl git -y
$ bash -c "$(curl -fsSL https://get.dockstarter.com)"
$ sudo reboot
Arch, Manjaro, EndeavourOS, etc.
$ sudo pacman -Sy curl docker git
$ bash -c "$(curl -fsSL https://get.dockstarter.com)"
$ sudo reboot
Raspbian requires a few extra commands.
$ sudo apt update
$ sudo apt dist-upgrade
$ sudo apt install curl git -y
$ bash -c "$(curl -fsSL https://get.docker.com)"
$ bash -c "$(curl -fsSL https://get.dockstarter.com)"
$ sudo reboot
Note that while writing this article, I personally tested it on Debian and Red Hat based Linux distributions, and it worked well without any errors.
If you encounter any errors or bugs on installation, then feel free to ask for help in the comment section or create a GitHub issue.
How to Set Up and Configure Docker Containers Using DockSTARTer
Once you have Docker, Docker Compose, and DockSTARTer installed, you can straightaway use DockSTARTer to set up and configure applications in a consistent and isolated environment.
1. Execute the following command to run DockSTARTer:
$ ds
2. Now you will be interacting with the following main menu, where you can use the Up and Down arrow keys to navigate and the Enter key to select specific options. For now, navigate to the βConfiguration
β option and hit enter.
3. And then select βFull setup
β.
4. Now you will have the complete list of all the applications supported by this script. By default, βWatchtower
β is selected, but you are free to select more than one application by using the Spacebar to select and deselect. Right now, we will only use the βWatchtower
β to make it easier for you to understand.
5. Now you will be presented with the default settings for βWatchtower
β arranged by the DockSTARTer for you; if you want to keep the default setting and move forward, then select βYes
β, otherwise βNo
β.
6. Next, you will be presented with the default VPN settings arranged by the DockSTARTer for you; choose βYes
β, otherwise βNo
β to modify them manually.
7. Now, it will prompt you with the default global settings for DockSTARTer, where you can modify the values for the βDOCKERCONFDIRβ, βDOCKERSTORAGEDIRβ, βDOCKERHOSTNAMEβ, βPGIDβ, βPUIDβ, and βTZβ environment variables.
For instance, I will keep the default settings and select βYes
β to move forward; if you want to edit the settings, then select βNo
β.
8. Next, you will be asked to choose whether to start the compose or not. Select βYes
β to do so.
Now, it will get all the Docker images it needs from the internet and set them up based on the settings you gave it.
Finally, you can list all the containers that are running on your Linux system to check whether the selected container is running or not.
$ sudo docker ps
Output:
Install Another New App
When you want to install another new app using the DockSTARTer, simply execute the following command:
$ ds
And then navigate to βConfiguration
β => βSelect Apps
β.
The benefit of using this option is that it will configure the app based on the previously provided settings.
Modify DockSTARTer Settings
Predefined settings (or variables) can be edited even after the container is started by executing the βds
β command and selecting the βConfiguration
β option. And then select any of the following options to update the respective setting variable value.
Remove Apps
To remove the apps, first make sure to stop the container by providing the app container id to the following command:
$ sudo docker stop <container-id>
Now, start the DockeSTARTer and navigate to βConfiguration
β => βSelect Apps
β and uncheck the apps that you want to remove and select Ok to remove that app.
Update DockSTARTer
To update DockSTARTer, simply execute the following command:
$ sudo ds -u
Or, you can run the DockSTARTer using the βds
β command and choose the βUpdate DockSTARTer
β option.
Prune Docker System
If youβre familiar with Docker and Docker compose, youβre probably aware of their caching mechanism, which caches all the containers, networks, volumes, images and build caches that can occupy a good amount of system space over time.
Execute the following command to remove the unused containers, networks, volumes, images and build caches.
$ sudo docker system prune
Or, you can run the DockSTARTer using the βds
β command and choose the βPrune Docker System
β option.
Conclusion
Even though this is a great tool for making it easy to manage Docker containers, it has some common problems, such as limited functionality (when users want to set up complex or specific configurations) or maintenance (updating the tool regularly to fix bugs).
So, thatβs all for now. If you have any questions or queries related to this tool, then feel free to ask them in the comment section.
Till then, peace!
To the linuxtldr.com admin, You always provide great examples and case studies.
Hi, Francisco Page, We appreciate your kind words and are committed to providing high-quality content in the near future. Stay tuned for more exciting things coming soon.