From d22786dee2ba76ff399522e2a51db1a291cb4700 Mon Sep 17 00:00:00 2001 From: that-one-tom <19203795+that-one-tom@users.noreply.github.com> Date: Thu, 2 Feb 2023 09:32:39 +0100 Subject: [PATCH] Updated commands to use docker compose v2 --- .../server-setups/docker-compose.md | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/docs/hosting/installation/server-setups/docker-compose.md b/docs/hosting/installation/server-setups/docker-compose.md index 096908b91..dee16d436 100644 --- a/docs/hosting/installation/server-setups/docker-compose.md +++ b/docs/hosting/installation/server-setups/docker-compose.md @@ -4,24 +4,18 @@ If you have already installed Docker and Docker-Compose, then you can start with ### 1. Install Docker -This can vary depending on the Linux distribution used. The below example is for Ubuntu: +This can vary depending on the Linux distribution used. You can find detailed instructions [here in the Docker documentation](https://docs.docker.com/engine/install/). The below example is for Ubuntu: ```bash -sudo apt update -sudo apt install apt-transport-https ca-certificates curl software-properties-common -y -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo apt-get remove docker docker-engine docker.io containerd runc +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg lsb-release +sudo mkdir -p /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /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 -# Depending on Version: - -# Ubuntu 18.04: -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" - -# Ubuntu 20.04 -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" - -sudo apt update -sudo apt upgrade -y -sudo apt install docker-ce -y +sudo apt-get update +sudo apt-get install docker-ce docker-ce-cli containerd.io ``` ### 2. Optional: Non-root user access @@ -35,13 +29,12 @@ su - ${USER} ### 3. Install Docker-Compose -This can vary depending on the Linux distribution used. Before proceeding check the latest version of Docker Compose v1 [on the repository's release page](https://github.com/docker/compose/releases) and replace the `1.29.2` below. Should you wish to use Docker Compose v2 instead you can find detailed instructions [here in the Docker documentation](https://docs.docker.com/compose/cli-command/). +This can vary depending on the Linux distribution used. You can find detailed instructions [here in the Docker documentation](https://docs.docker.com/compose/). The example below is for Ubuntu: ```bash -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 -sudo chmod +x /usr/local/bin/docker-compose +sudo apt-get install docker-compose-plugin ``` ### 4. DNS setup