Coder Social home page Coder Social logo

docker-docker-compose's Introduction

DEPRECATION NOTICE

This image is deprecated. We will not offer support for this image and it will not be updated. Docker Compose is now available from the docker repos: https://docs.docker.com/engine/install/

And also for direct download: https://github.com/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

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io 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

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/docker-compose:latest 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 Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf arm32v7-<version tag>

Version Tags

This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.

Tag Available Description
latest docker-compose v1 releases
alpine docker-compose v1 releases with our alpine baseimage
v2 docker compose v2 releases

Usage

Docker cli

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

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

Recommended method

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.

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running: docker exec -it docker-compose /bin/bash
  • To monitor the logs of the container in realtime: docker logs -f docker-compose
  • container version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' docker-compose
  • image version number
    • docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/docker-compose:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Run

  • Update the image: docker pull lscr.io/linuxserver/docker-compose:latest
  • 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 lscr.io/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

  • 16.02.23: - Deprecate image.
  • 15.03.22: - Add v2 branch. Change master to only fetch v1 releases. Change alpine to only fetch v1 releases. Rebase master to focal. Rebase alpine to 3.15.
  • 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.

docker-docker-compose's People

Contributors

aptalca avatar linuxserver-ci avatar nemchik avatar thelamer avatar thespad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-docker-compose's Issues

tradditional install replacement

Is it possible to to use this container as replacement for the tradional install method? It would be nice to have up-to-date compose running in a container, but with the possibility to deploy the containers to the host, like the old way. Is this the purpose of this container?

[linuxserver/docker-compose] “Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?”

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our Discord server for general support.


Expected Behavior

docker-compose should finddocker-compose.yml in the current directory and proceed normally.

Current Behavior

docker-compose does not find docker-compose.yml, even when it’s really there.

ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

Even if I use -f to manually define the path of the file, it just shows all the possible commands.

Steps to Reproduce

  1. Install linuxserver/docker-compose using “Recommended” method (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 )
  2. Write any valid docker-compose.yml file
  3. Run docker-compose config in the same directory as docker-compose.yml

Environment

OS: Fedora CoreOS 32 Stable
CPU architecture: x86_64
How Docker was installed: Included as part of the OS (container Linux distribution)

Command used to create Docker container (run/create/compose/screenshot)

Docker Compose (https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml)

Feature request: Support for Compose file version 3 reference

linuxserver.io


Expected Behavior

Support for Compose file version 3 reference

Current Behavior

Support for Compose file version 2 reference

Environment

Any

Command used to create docker container (run/create/compose/screenshot)

Add "cap_add" or "cap_drop" attributes in docker compose file will trigger the issue.

Docker logs

ERROR: yaml.scanner.ScannerError: sequence entries are not allowed here

Profile doesn't work

linuxserver.io


Expected Behavior

Profile should work as document explained: https://docs.docker.com/compose/profiles/
The official docker-compose script works well.

Current Behavior

Profile doesn't work either with "--profile" or environment "COMPOSE_PROFILES"

Steps to Reproduce

Environment

OS: Tried on Debian Buster and Ubuntu Focal
CPU architecture: tried on both x86_64 and arm64
How docker service was installed:
from the official docker repo

Command used to create docker container (run/create/compose/screenshot)

compose

Feature Request: Support environment variable for version

Expected Behavior

Set a DOCKER_COMPOSE_VERSION environment variable and have the run script use it.
If the environment variable doesn't exist, have it default to latest.

Current Behavior

In order to change versions you have to edit the run script itself.

Thoughts

Keeping config in the environment is a normal and accepted pattern. Having version pinning is also a normal/desired feature from a CICD perspective. Having to edit the script to run docker-compose in a specific version seems like an anti-pattern.

It think this change is as easy as changing

VERSION="latest" # can be set to a specific version tag from docker hub, such as "1.25.5", or "alpine"
IMAGE="linuxserver/docker-compose:$VERSION"

to

DOCKER_COMPOSE_VERSION:="latest" # can be set to a specific version tag from docker hub, such as "1.25.5", or "alpine"
IMAGE="linuxserver/docker-compose:$DOCKER_COMPOSE_VERSION"

I would be happy to put in a PR if this is something others would like. Perhaps a different Variable name to prevent confusion between the docker version and the container version?

Build args doesn't work

linuxserver.io


Expected Behavior

I have a scenario similar to the following:

version: '3'

services:
    myservice:
        build:
            context: .
            dockerfile: Dockerfile.alpine
            args:
                - MY_VAR=$MY_VAR

When I try to run through the recommended docker-compose installation, he can't build because he doesn't find MY_VAR.

Current Behavior

It says he can't find MY_VAR and ends up leaving it with an 'empty' value, I had to install the docker-compose in order to run the project through the build.

Environment

OS: 5.8.16-2-MANJARO
CPU architecture: x86_64
How docker service was installed: through the recommended method

Command used to create docker container (run/create/compose/screenshot)

Behavior presented in both:

docker-compose up --build
docker-compose build

enter bash in v2

I want to spawn a container and do my work inside of it. For this, I want to spawn a bash in the container.

  ~ ❯ docker run --rm -it lscr.io/linuxserver/docker-compose:v2 bash                                        at  20:28:09

Usage:  docker compose [OPTIONS] COMMAND

Docker Compose

Options:
      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default
                                   "auto")
      --compatibility              Run compose in backward compatibility mode
      --env-file string            Specify an alternate environment file.
  -f, --file stringArray           Compose configuration files
      --profile stringArray        Specify a profile to enable
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the Compose file)
  -p, --project-name string        Project name

Commands:
  build       Build or rebuild services
  convert     Converts the compose file to platform's canonical format
  cp          Copy files/folders between a service container and the local filesystem
  create      Creates containers for a service.
  down        Stop and remove containers, networks
  events      Receive real time events from containers.
  exec        Execute a command in a running container.
  images      List images used by the created containers
  kill        Force stop service containers.
  logs        View output from containers
  ls          List running compose projects
  pause       Pause services
  port        Print the public port for a port binding.
  ps          List containers
  pull        Pull service images
  push        Push service images
  restart     Restart containers
  rm          Removes stopped service containers
  run         Run a one-off command on a service.
  start       Start services
  stop        Stop services
  top         Display the running processes
  unpause     Unpause services
  up          Create and start containers
  version     Show the Docker Compose version information

Run 'docker compose COMMAND --help' for more information on a command.
unknown docker command: "compose bash"

For V2, this is not working.
For V1, this works fine:

  ~ ❯ docker run --rm -it lscr.io/linuxserver/docker-compose:latest bash                                    at  20:28:45
root@4b1185d03e49:/#

So how can I achieve this behaviour in V2?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.