From fc738edf0d69bdb50fcb28625acf54324504b8c3 Mon Sep 17 00:00:00 2001 From: aptalca Date: Wed, 7 Oct 2020 14:24:01 -0400 Subject: [PATCH 1/2] add compose install instructions --- general/docker-compose.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/general/docker-compose.md b/general/docker-compose.md index b6776d74d..9ef57a912 100644 --- a/general/docker-compose.md +++ b/general/docker-compose.md @@ -2,7 +2,27 @@ ## Intro -Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. You can follow these instructions to install docker-compose: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/) +Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. + +## Installation + +The recommended method of install is to use our [docker-compose image](https://github.com/linuxserver/docker-docker-compose) via a run script. You can simply run the following commands on your system and you should have a functional install that you can call from anywhere as `docker-compose`: +``` +sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +``` +In order to update the local image, you can run the following commands: +``` +docker pull linuxserver/docker-compose:"${DOCKER_COMPOSE_IMAGE_TAG:-latest}" +docker image prune -f +``` +To use the slimmer and more lightweight alpine based image, you can set an env var `DOCKER_COMPOSE_IMAGE_TAG=alpine` in your respective `.profile`. Alternatively you can set that var to a versioned image tag like `version-1.27.4` or `version-alpine-1.27.4` to pin it to a specific docker-compose version. + +We also publish binaries for docker-compose in [this repo](https://github.com/linuxserver/docker-docker-compose/releases). There are two versions, one for glibc based systems like Ubuntu and Debian, and one for musl based systems like Alpine. The latter are marked with the `alpine` tag. Each version contains binaries for `amd64`, `armhf` and `arm64`. You can pull these binaries into your system via the following commands to have a functional docker-compose install: +``` +sudo curl -L --fail https://github.com/linuxserver/docker-docker-compose/releases/download/1.27.4-ls17/docker-compose-amd64 -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +``` ## Single service From 699b67d2acdeef785e088fded7eaef13c7448d4a Mon Sep 17 00:00:00 2001 From: aptalca Date: Wed, 7 Oct 2020 14:45:33 -0400 Subject: [PATCH 2/2] Clarify install options --- general/docker-compose.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/general/docker-compose.md b/general/docker-compose.md index 9ef57a912..65ca461c8 100644 --- a/general/docker-compose.md +++ b/general/docker-compose.md @@ -6,7 +6,8 @@ Compose is a tool for defining and running multi-container Docker applications. ## Installation -The recommended method of install is to use our [docker-compose image](https://github.com/linuxserver/docker-docker-compose) via a run script. You can simply run the following commands on your system and you should have a functional install that you can call from anywhere as `docker-compose`: +### Install Option 1 (recommended): +You can install docker-compose using our [docker-compose image](https://github.com/linuxserver/docker-docker-compose) via a run script. You can simply run the following commands on your system and you should have a functional install that you can call from anywhere as `docker-compose`: ``` sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose @@ -18,13 +19,14 @@ docker image prune -f ``` To use the slimmer and more lightweight alpine based image, you can set an env var `DOCKER_COMPOSE_IMAGE_TAG=alpine` in your respective `.profile`. Alternatively you can set that var to a versioned image tag like `version-1.27.4` or `version-alpine-1.27.4` to pin it to a specific docker-compose version. +### Install Option 2: We also publish binaries for docker-compose in [this repo](https://github.com/linuxserver/docker-docker-compose/releases). There are two versions, one for glibc based systems like Ubuntu and Debian, and one for musl based systems like Alpine. The latter are marked with the `alpine` tag. Each version contains binaries for `amd64`, `armhf` and `arm64`. You can pull these binaries into your system via the following commands to have a functional docker-compose install: ``` sudo curl -L --fail https://github.com/linuxserver/docker-docker-compose/releases/download/1.27.4-ls17/docker-compose-amd64 -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose ``` -## Single service +## Single service Usage Here's a basic example for deploying a Linuxserver container with docker-compose: @@ -52,7 +54,7 @@ If you want to do it from a different folder or if you named the yaml file diffe To bring down the services, simply do `docker-compose down` or `docker-compose -f /path/to/heimdall.yml down` and all containers defined by the yml will be stopped and destroyed. -## Multiple Services +## Multiple Service Usage You can have multiple services managed by a single compose yaml. Copy the contents below the `services:` line in any of our readme yaml samples into the same yaml file and the `docker-compose up/down` commands will apply to all services at once.