Benutzer-Werkzeuge

Webseiten-Werkzeuge


server:docker

Docker

Übersicht

Docker-Version:

docker --version
docker-compose --version

Docker Engine

# Uninstall old versions
sudo apt remove docker docker-engine docker.io containerd runc

# Install needed tools
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg

# Setup repo
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update

# Install docker
sudo apt install docker-ce docker-ce-cli containerd.io

# Test
sudo docker run hello-world

Docker Compose

# Download the current stable release of Docker Compose:
# sudo curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# Ausführbar machen
sudo chmod +x /usr/local/bin/docker-compose

# Test
docker-compose --version
server/docker.txt · Zuletzt geändert: 2024/07/05 11:02 von hse