Questions tagged [docker-compose]

Docker-compose is a tool that is able to run multiple container by issuing docker-compose up. One of the features is that DNS mappings could be made between the containers so that they can find each other.

262 questions
45
votes
3 answers

Healthcheck: CMD vs CMD-SHELL

It's not clear to me what are the differences between CMD and CMD-SHELL in Docker Compose healthcheck. What are the benefits of using CMD-SHELL compared to CMD? What are the use cases for CMD and CMD-SHELL?
Zulhilmi Zainudin
  • 551
  • 1
  • 4
  • 4
43
votes
3 answers

Why is one not allowed to use a Boolean in a docker-compose.yml?

Defining a boolean in a docker-compose.yml file: environment: SOME_VAR: true and running docker up results in: contains true, which is an invalid type, it should be a string, number, or a null Attempts to solve the issue If true is changed to…
030
  • 13,383
  • 17
  • 76
  • 178
37
votes
4 answers

docker-compose invalid type, it should be a string

I have the following environment variable configured in a docker-compose.yml file: version: '3' services: server: ports: - 13045:3000 environment: - NODE_CONFIG: '{"DATABASE_URL":"http://db:5984"}' When trying to run…
Tri Nguyen
  • 471
  • 1
  • 4
  • 5
35
votes
4 answers

How can I force Docker Compose to rebuild containers when dockerfile changes?

I am using docker-compose to start 2 containers using the following docker-compose.yaml. version: '2.4' services: myservice1: container_name: mycontainername build: context: . dockerfile: ./my-dockerfolder/Dockerfile …
bnieland
  • 465
  • 1
  • 4
  • 6
34
votes
2 answers

Connect Docker container to both host and internal bridge network

I am trying to run a Docker container as a router between a private (--internal) Docker network and the predefined host network. This means the container needs to have two network interfaces: One "outside" interface, that can access all host IP…
Hexaholic
  • 611
  • 1
  • 5
  • 8
34
votes
5 answers

docker-compose healthcheck for rabbitMQ

I'm trying to run rabbitMQ using docker-compose, but the service is always starting or unhealthy. rabbit is running fine, so I suspect there is something wrong with my health check. Running the healthcheck command locally does return a value. > curl…
ConorSheehan1
  • 515
  • 1
  • 7
  • 10
18
votes
3 answers

Why are unnamed volumes created when `docker-compose up` is run and do these double after issuing `docker-compose down && docker-compose up`?

When starting a docker compose application, it creates named volume the first time around and then additional volumes each time it is started. Is this the normal behavior in that it creates incremental volumes or is my docker-compose file broken? In…
Moritz
  • 1,227
  • 2
  • 11
  • 24
17
votes
2 answers

How to deal with docker compose's naming convention of named volumes?

When defining named volumes in docker-compose.yml, their names are prepended with their parent folder name. This causes a problem when scripts outside of docker compose have to interact with them. The question is, what is the best way to deal with…
Moritz
  • 1,227
  • 2
  • 11
  • 24
14
votes
4 answers

Is running docker-compose not supported in BitBucket?

Aim The aim is to run docker-compose in BitBucket pipelines Attempt bitbucket-pipelines.yml image: docker/compose:1.12.0 pipelines: default: - step: script: - docker-compose up --build Outcome The Docker Engine version is…
030
  • 13,383
  • 17
  • 76
  • 178
12
votes
7 answers

Is there one website that contains all relevant DevOps news and gets updated on a daily basis?

I am looking for some DevOps news channel like https://nos.nl/teletekst#101 that shows the headlines of the Dutch news. I am aware of https://tweakers.net/ and github.com, but this does not contain all interesting news on one page. Basically, I…
030
  • 13,383
  • 17
  • 76
  • 178
12
votes
2 answers

Is it possible to build docker images using docker-compose concurrently?

When one runs docker-compose up --build then the docker images are created sequential. Is it possible to build these images concurrently using docker-compose? There are multiple issues including this, but it is unclear whether it is possible or not.
030
  • 13,383
  • 17
  • 76
  • 178
12
votes
2 answers

What is the purpose of running PHP-FPM in its own container instead in the same container as apache2/nginx?

I'm fairly new to Docker so excuse any obvious ignorance or misunderstandings. That said, I've been coding and configuring web applications for a long time now. I have recently been dabbling with some more sophisticated (Docker and "traditional")…
CoolElectricity
  • 195
  • 1
  • 9
11
votes
4 answers

docker-compose.yml - make network name configurable via environment variable

I have a docker compose file with env variables for stage specific configurations. As long as env variables are used in values in docker-compose.yml everything is fine, but the problem is with the network name, since it's specified in the…
ivicaa
  • 260
  • 2
  • 8
11
votes
1 answer

Internal network between container Docker Compose with outgoing connection

I am a newbie to Docker. I am trying to run my application containing from multiple containers Here is my docker-compose.yml file version: '3.3' services: php-service: container_name: 'php-service' build: './php-service' networks: …
solderingiron
  • 107
  • 1
  • 1
  • 4
10
votes
5 answers

Docker compose volume syntax valid for Windows and Linux

We have developers working on an app using both Windows and Linux. The application is built within a Docker container, and ships a docker-compose specification for the build environment. The local directory is mounted as a volume: volumes: …
Bruce Becker
  • 3,783
  • 4
  • 20
  • 41
1
2 3
17 18