docker-documentation/images/docker-docker-compose.md

9.2 KiB
Executable File

title
docker-compose

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

linuxserver/docker-compose

GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry MicroBadger Layers Docker Pulls Docker Stars Jenkins Build

Docker-compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration.

docker-compose

Supported Architectures

Our images support multiple architectures such as x86-64, arm64 and armhf. We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling linuxserver/docker-compose should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Tag
x86-64 amd64-latest
arm64 arm64v8-latest
armhf arm32v7-latest

Version Tags

This image provides various versions that are available via tags.

Tag Description
latest Ubuntu based images
alpine Alpine based images

Usage

Docker cli

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:$PWD" \
  -w="$PWD" \
  linuxserver/docker-compose \
  up

You can replace the last line with any docker-compose command and argument, which will be passed to docker-compose inside the image.

We provide a very convenient script that allows the docker-compose container to run as if it was installed natively:

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

Running these two commands on your docker host once will let you issue commands such as docker-compose up -d and the docker-compose container will do its job behind the scenes.

Binaries

We are also providing the binaries for both docker-compose and docker-cli for all three arches in Github releases. You can download the correct binaries for your arch directly and drop into /usr/local/bin/.

Docker Mods

Docker Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) can be accessed via the dynamic badge above.

Support Info

  • image version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/docker-compose

Updating Info

Via Docker Cli

  • Update the image: docker pull linuxserver/docker-compose
  • You can also remove the old dangling images: docker image prune

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-docker-compose.git
cd docker-docker-compose
docker build \
  --no-cache \
  --pull \
  -t linuxserver/docker-compose:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 17.12.20: - Update run.sh with formatting changes.
  • 04.10.20: - Update run.sh with changes from upstream.
  • 31.08.20: - Update tox and virtualenv.
  • 31.07.20: - Add support for global env var DOCKER_COMPOSE_IMAGE_TAG in the run.sh script.
  • 06.07.20: - Publish docker-compose and docker-cli binaries in Github releases.
  • 01.07.20: - Release alpine based images at alpine tag.
  • 04.06.20: - Bump docker-cli to 19.03.8, auto-detect python3 version.
  • 19.05.20: - Initial Release.