2022-12-04 11:49:15 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-12-12 20:38:44 +01:00
|
|
|
# This installs Docker on Ubuntu Linux
|
2022-12-04 11:49:15 +01:00
|
|
|
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-docker.sh)
|
|
|
|
|
|
|
|
echo "Installing Docker..."
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Install distribution packages.
|
|
|
|
sudo apt-get update
|
2022-12-04 11:51:04 +01:00
|
|
|
sudo apt-get -qq install ca-certificates curl gnupg lsb-release
|
2022-12-04 11:49:15 +01:00
|
|
|
|
|
|
|
# Install key.
|
|
|
|
sudo mkdir -p /etc/apt/keyrings
|
2023-02-01 13:01:32 +01:00
|
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg
|
2022-12-04 11:49:15 +01:00
|
|
|
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
|
|
|
|
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
|
|
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
|
|
|
|
|
|
# Install Docker with Compose Plugin.
|
|
|
|
sudo apt-get update
|
2022-12-30 19:49:18 +01:00
|
|
|
sudo apt-get -qq install docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io docker-compose-plugin cgroupfs-mount libltdl7 pigz
|
2022-12-04 11:49:15 +01:00
|
|
|
|
|
|
|
# Verify installation works.
|
|
|
|
sudo docker run hello-world
|