/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
sudo apt install powertop gpg tailscale tailscale-archive-keyring
brew install btop powertop bat eza
bat cache --build
- Set up Docker'sĀ
apt
Ā repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
- Install the Docker packages.
To install the latest version, run:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
To create theĀ docker
Ā group and add your user:
-
Create theĀ
docker
Ā group.sudo groupadd docker
-
Add your user to theĀ
docker
Ā group.sudo usermod -aG docker $USER
-
Log out and log back in so that your group membership is re-evaluated.
If you're running Linux in a virtual machine, it may be necessary to restart the virtual machine for changes to take effect.
You can also run the following command to activate the changes to groups:
newgrp docker
Many modern Linux distributions useĀ systemdĀ to manage which services start when the system boots. On Debian and Ubuntu, the Docker service starts on boot by default. To automatically start Docker and containerd on boot for other Linux distributions using systemd, run the following commands:
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
To stop this behavior, useĀ disable
Ā instead.
sudo systemctl disable docker.service
sudo systemctl disable containerd.service
Backup & Restore
docker run --rm --volumes-from <container> -v $(pwd):/backup busybox tar cvfz /backup/backup.tar.gz <container-paths>
docker run --rm --volumes-from <container> -v $(pwd):/backup busybox sh -c "cd <container-paths> && tar xvfz /backup/backup.tar.gz --strip 1"