Automated Docker Environment Configuration for Linux
Detects your OS, installs the official Docker Engine, creates dedicated users with correct permissions,
and optionally deploys Portainer for immediate container management.
Features • Quick Start • Capabilities • Notes
git clone https://github.com/Narehood/Docker-Prep
cd Docker-Prep
bash install.sh| Feature | Description |
|---|---|
| Auto-Detection | Identifies your distro and installs the correct Docker Engine package |
| User Management | Creates a dedicated Docker user or configures existing users for rootless access |
| Permission Fix | Automatically handles group assignments (usermod -aG docker) |
| Portainer Ready | Option to instantly deploy Portainer via the script |
| Secure Defaults | Ensures proper service enabling and user permission handling |
The script guides you through a simplified menu to perform the following:
| Action | Description |
|---|---|
| Install Docker Engine | Updates repositories, installs dependencies, and sets up the Docker daemon |
| User Configuration | Creates a new user specifically for Docker or adds your current user |
| Security Groups | Adds the selected user to the docker group for non-root command execution |
| Portainer Deployment | Pulls and runs the Portainer CE container on port 9443 |
| Note | Details |
|---|---|
| Root Access | Script must be run as root or with sudo privileges |
| Re-Login Required | Log out and back in after adding a user to the Docker group |
| Portainer | If installed, accessible at https://<your-ip>:9443 |
Licensed under the MIT License.
You are free to use and modify this script as you wish.