2.0 KiB
2.0 KiB
Docker-Install
A polished one-command Docker installer for fresh Ubuntu/Debian servers.
It installs:
- Docker Engine
- Docker CLI
- containerd
- Docker Buildx plugin
- Docker Compose plugin
It can also optionally add a chosen Linux user to the docker group so Docker commands can be run without sudo after the user logs out/in.
One-command install
Install Docker only:
curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/install-docker.sh | bash
Install Docker and add the current SSH/login user to the docker group:
curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/install-docker.sh | bash -s -- --current-user
Install Docker and add a specific user to the docker group:
curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/install-docker.sh | bash -s -- --user obin
Non-interactive install without adding a docker user:
curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/install-docker.sh | bash -s -- --yes
Local usage
git clone https://gitea.wheelytho.com/Wheelz/Docker-Install.git
cd Docker-Install
chmod +x install-docker.sh
./install-docker.sh --current-user
The old Docker-Install.sh filename still exists as a compatibility wrapper.
Options
--user USER Add USER to the docker group after install.
--current-user Add the invoking SSH/login user to the docker group.
--no-docker-user Do not add anyone to the docker group.
-y, --yes Non-interactive defaults. Skips docker group unless --user/--current-user is supplied.
-h, --help Show help.
After adding a user to the docker group
Group membership does not apply to already-open shells. Log out and back in, or run:
newgrp docker
Then verify Docker works without sudo:
docker run --rm hello-world
Supported systems
- Ubuntu
- Debian
The installer uses Docker's official apt repository for the detected OS and codename.