Questions tagged [docker-compose]

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

Docker Compose is an officially supported tool to build multi-container applications. An application author or deployer creates a YAML file, generally named docker-compose.yml, that lists the containers or services that make up the application, along with other Docker-specific resources such as named volumes or containers. Docker Compose supports some features of , though it also works well for single-host Docker installations.

This tag is appropriate for questions about setting up the docker-compose.yml file and other questions about deployment or communication between containers managed by Docker Compose. It may be appropriate to tag your questions as as well. Please include a good extract of the docker-compose.yml file as a code block in your question, enough to reproduce the issue you are asking about.

Remember that questions must be programming-related. Questions on how to install Compose, how to use Compose to manage existing prebuilt images, or how to run someone else's Compose file are not programming-related and are not on topic for Stack Overflow.

Key links:

30464 questions
10
votes
3 answers

docker compose variable substitution

It seems that I am not understanding something about variable substitution in the following page (my variable NUM is not registering): https://github.com/compose-spec/compose-spec/blob/master/spec.md#Interpolation See screenshot below. Running this…
user3659451
  • 1,913
  • 9
  • 30
  • 43
10
votes
1 answer

What is the location of config file in Docker 1.9?

In the version 1.8 of Docker we could find the docker config file under /etc/sysconfig However, after installing Docker 1.9 I cant see the docker config file under /etc/sysconfig What is the new location of the config file?? Distribution: Centos 7.1
meallhour
  • 13,921
  • 21
  • 60
  • 117
10
votes
2 answers

how to configure docker to use apache and php in separate containers

i need to setup a particular LAMP environment using docker, with : debian squeeze 6.0.10 apache 2 php 5.6 mysql 5.5 having app code hosted on a base image with debian + apache, i wonder if it's possibile to use a php container instead default…
jkkso
  • 126
  • 1
  • 5
10
votes
5 answers

no django app created when following the docker-compose tutorial

I'm following the docker-compose tutorial, to try and figure out how to get a django app to deploy: http://docs.docker.com/compose/django/ And everything's going smoothly (the app even works!) but the django project folder composeexample isn't…
0atman
  • 3,298
  • 4
  • 30
  • 46
10
votes
2 answers

Save file from Python script to Docker Container

I have a simple Python script, inside of a Docker container, that: -Makes a call to an external API -A license file is returned from the API I want to be able to save the returned license file, to my directory inside of the docker container. This is…
Jonathan
  • 2,565
  • 4
  • 18
  • 25
10
votes
3 answers

What is a good way to add python dependencies to a Docker container?

I am trying to integrate docker in to my django workflow and I have everything set up except one really annoying issue. If I want to add dependencies to my requirements.txt file I basically just have to rebuild the entire container image for those…
Spencer Cooley
  • 8,471
  • 16
  • 48
  • 63
10
votes
1 answer

Configuring MongoDB replica set from docker-compose

I'm using docker-compose to start 3 MongoDB servers which should be in a replica set. I first start 3 MongoDB servers, then I configure the replica set. This is how I would do the replica set config in a bash script: mongo --host 127.0.0.1:27017…
martins
  • 9,669
  • 11
  • 57
  • 85
10
votes
2 answers

docker-compose run does not set links

I have a docker-compose.yml file along the lines of: analytics: build: . links: - mongo:mongo ports: - 80:80 mongo: build: docker_containers/mongo expose: - 27017 Running docker-compose up creates a link in…
Mihnea DB
  • 386
  • 3
  • 9
9
votes
1 answer

"docker: 'compose' is not a docker command" when running docker compose

After installing the latest version of Docker Desktop on my M1 Mac pro, I can't seem to run docker compose despite having all the correct files installed. I've tried running docker-compose and docker compose in my terminal and I get this message:…
Flik
  • 365
  • 1
  • 7
  • 18
9
votes
1 answer

Docker - No matching manifest for linux/arm64/v8 in the manifest list entries - Ubuntu 22.04/arm64/v8

I have installed Docker and docker compose and tested it and i got the “Hello World” message, so everything works fine After that i tried to install a Node.js backend, but idk why i keep getting this error message " no matching manifest for…
Ahmed AlNeaimy
  • 343
  • 3
  • 14
9
votes
5 answers

Manifest for java:8-jre-alpine not found: manifest unknown: manifest unknown

I'm facing this error while building on Ubuntu server: Step 1/10 : FROM java:8-jre-alpine ERROR: Service 'XXXX' failed to build: manifest for java:8-jre-alpine not found: manifest unknown: manifest unknown It was working fine since months,…
Ahmad Mousa
  • 745
  • 2
  • 7
  • 18
9
votes
3 answers

unknown shorthand flag: 'd' in -d docker compose

I am working with a docker compose. when a trying to run docker compose in background, but it shows error unknown shorthand flag: 'd' in -d I am tried in this way docker compose -d up docker-compose.yml version: '3' networks: loki: services: …
Amjed saleel
  • 348
  • 1
  • 3
  • 15
9
votes
2 answers

Docker: Error response from daemon: unauthorized: The client does not have permission for manifest

My company uses Artifactory to store it's artifacts and I was getting this error when I tried to pull down the image. When I run docker compose up -d I got the error, Error response from daemon: unauthorized: The client does not have permission for…
smunizaga
  • 481
  • 2
  • 6
  • 12
9
votes
6 answers

Docker with create react app is not updating changes

I'm creating a React app with docker in WSL2 and create-react-app and everything seems to be working fine except the app is not updating with changes in the code. I mean, when I make a change in the code, the browser should update the changes…
chococroqueta
  • 694
  • 1
  • 6
  • 18
9
votes
1 answer

How to set Docker Compose `env_file` relative to `.yml` file when multiple `--file` option is used?

I am trying to set my env_file configuration to be relative to each of the multiple docker-compose.yml file locations instead of relative to the first docker-compose.yml. The documentation…
Zhao Li
  • 4,936
  • 8
  • 33
  • 51
1 2 3
99
100