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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
568 views

Error while trying to run docker redis image on Alpine Linux 3.7.0

Specifications Microsoft Windows [Version 10.0.14393] VirtualBox 5.2.8 Alpine Linux Extended 3.7.0 Docker Info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 17.10.0-ce ...
2 votes
2 answers
3k views

docker-compose local variable declare and use

In the programming language we can define and declare a variable and use it later in the program, can we do same in docker-compose file? For example in Java: int x = 100; System.out.println("...
7 votes
2 answers
675 views

How to move disk image in the command line?

As answered in this questions: Does Docker on MacOS support tmpfs? In order to run in memory docker, I need to move docker volumes to ramdisk. In macOS I can do it through docker preferences. However, ...
4 votes
1 answer
7k views

How can I push multiple containers, created with docker-compose, to a registry

I am using Jenkins pipeline and run a shell command to bring up my linked containers for testing. Once the testing is complete, I want to push the containers to a registry (I would prefer AWS ERC, but ...
5 votes
1 answer
852 views

docker-compose fails to recognize when images are rebuilt sometimes ... often same code is OK

I have a devops container inside of which I execute docker build and docker-compose up commands which run OK then (on same server or different server with same code) sometimes incorrectly fail to ...
0 votes
1 answer
206 views

docker micro-service cannot connect to bitcoin docker

I have a micro-service watchblockchain that makes requests on bitcoin blockchain. When I use both services, everything works just fine. Then I want to put those services in docker containers. ...
  • 113
6 votes
2 answers
6k views

Why should you do port mapping for docker containers?

I have been using docker for a few months and I am just a developer not a DevOps or a networking person. However, I came across a docker-compose which maps an external port to an internal port. ...
  • 163
3 votes
1 answer
8k views

Docker swarm replica stays 0/1 and service stays in status new

I have a problem with my docker swarm. I created a new service with the following command: docker-compose config | docker stack deploy -c - serviceNameX --with-registry-auth The docker-compose file ...
  • 176
4 votes
2 answers
3k views

Docker MongoDB image - How to specify credentials other than in the compose file?

I'm using this docker image https://hub.docker.com/_/mongo/. That image provides a way of initializing a mongodb root database user with env variables which I can specify in the compose file as ...
  • 143
6 votes
1 answer
441 views

Build Design - Docker vs Fedora's Mock

This post is migrated from a reddit post. Parts in bold are to adopt it to SE's format. I'm talking with companies to help streamline/combine their build process. They must do it together and their ...
  • 466
1 vote
2 answers
3k views

How to pass the version to docker-compose?

When I would like to update an app at the moment, docker-compose down, the version in the docker-compose.yaml is changed, subsequently the app is started and the latest version is running. Now I ...
  • 12.9k
1 vote
1 answer
1k views

How to integrate docker-compose or docker run command arguments into SCM and Jenkins build?

When I do docker run I have to give extensive argument options for my container setup. To mitigate this and ensure all developers are using the same arguments I switched to docker-compose. Now ...
  • 466
0 votes
1 answer
872 views

Using Jenkins to control docker image build flow

I'm trying to figure out the proper way to get build environments into a CI pipeline. What I want to achieve is: someone pushes to the docker source repo (not registry, a repo with the docker folder)...
  • 466
2 votes
0 answers
753 views

How to deploy with AWS CodePipeline a multicontainer docker environment without dockerfile

I'm using simple docker-compose container images. Here's my docker-compose.yml version: '2' services: db: image: postgres:10.2 ports: - "5432:5432" ...
2 votes
1 answer
2k views

Docker Compose V3 app container can't access couchdb container

I am trying to connect to couchdb through the container but my app is not seeing it. However if I use the external address 123.456.789.123:12345 (server_ip:external_port) it works but I need a ...
16 votes
2 answers
13k views

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 ...
  • 1,187
6 votes
1 answer
7k views

How to populate docker volumes in a build step to be used by a different container

I currently have a Docker compose based web app that uses Nginx as a reverse proxy that forwards traffic to a Flask and Grafana docker instance. The task at hand is to integrate a SSG (static site ...
  • 1,187
6 votes
1 answer
4k views

Nginx reverse proxy setup issues with Docker containers

I have two running docker containers: A Docker container running Nginx that serves Angular app resource files that were copied into the Docker image on docker build A Docker container that is an api ...
2 votes
1 answer
2k views

Traefik configuration issue with local proxy

Edit: I have updated my configuration to reflect Henrik Hoegh's tutorial. I am still running into issues. I am setting up a local development environment with lots of docker containers running ...
  • 141
3 votes
2 answers
85 views

How can secrets be distributed in a docker swarm?

Currently I use env and sql files so that docker compose can load secrets from there and build sql database docker instances with specific user/password. The question is, how can this be ported to ...
  • 1,187
10 votes
3 answers
3k views

Why is environment variable mangled in docker compose environment file

Context: docker-compose to start several containers, including Gunicorn that calls a Flask app. I'm using an environment file web/env.gunicorn to store my Gunicorn startup configuration. This file ...
  • 1,187
16 votes
3 answers
12k views

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 ...
  • 1,187
6 votes
2 answers
2k views

How to Shutdown Docker Stack on Container Failure

Say I have several docker services using swarm defined as such: version : '3' services: server: image : my_server:latest deploy: replicas: 5 ...
  • 101
5 votes
1 answer
362 views

How to run "docker/compose" container on RPi3?

I have pull the image https://hub.docker.com/r/docker/compose/ docker pull docker/compose But how can I run it to build my images on Raspberry Pi/rpi3?
1 vote
1 answer
11k views

Docker compose host variable in extra_hosts not working

I have a docker compose file with .env file, for example the .env file has this HOSTNAME=a1.test.com, and a docker-compose file has this: ... extra_hosts: - "${HOSTNAME}:1.1.1.1" - "test.com:1.1....
4 votes
2 answers
7k views

How to "docker-compose build" a service from code located in local git repository?

I have a git repository placed in local file system at /home/nou/code/lib.git Also I have /home/nou/docker-compose.yaml that is used to deploy a service based on the code from the repo: version: '2' ...
  • 143
7 votes
3 answers
7k views

Unable to mount docker folder into host using docker-compose

Here I created docker container which use the mariadb image and created three volumes as below. docker-compose.yml version: '2.0' services: mariadb: image: mariadb:latest restart: always ...
2 votes
2 answers
234 views

Docker-compose + Kubernetes: backports.ssl_match_hostname.CertificateError

I have a complete docker stack (source) which uses docker-compose. It works fine by its own, but now I'm trying to deploy it in Kubernetes' Minikube and when after eval $(minikube docker-env) I try ...
  • 415
5 votes
1 answer
224 views

Docker swarm stop spin up containers at 250

TLDR: Docker won't spin up more then 250 containers. I'm deploying a cluster of 3 docker services to a swarm with 2 nodes. 2 of the services need to contain 1 container (have a replicas: 1 in the ...
  • 201
6 votes
1 answer
288 views

Six repositories as a single deployment Docker+CircleCI

I need some help and be pointed in the correct direction. I have 6 git repositories that together combine a bigger application (3 Node.js API, 2 React web apps and one repository for Ansible and ...
1 vote
1 answer
471 views

Autorun ElasticSearch with Docker Compose

All of the tutorials online say to manually start elasticsearch as a daemon with a docker command from the command line. Is there a way to auto run it like redis, postgres and other services do from ...
2 votes
1 answer
2k views

Error with docker-compose - image not supported?

What's wrong with the following spec? (Image parameter is here to tag resulting image). version: '3' services: foo: build: image: foo/bar dockerfile: Dockerfile ...
  • 6,762
26 votes
2 answers
22k views

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 "...
  • 521
3 votes
2 answers
3k views

Dynamic YAMLs for Docker Compose

Currently I find myself managing a set of embarassingly similar YAMLs for environment profiles. I see there a scaling trouble if there will be lots of dynamic environments (i.e. fluid acceptance test ...
  • 6,762
35 votes
4 answers
78k views

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":"...
5 votes
1 answer
3k views

Understanding how Docker volumes work with compose

In the Docker Compose example for WordPress, the Ycode listing [1] says: volumes: - db_data:/var/lib/mysql What is exact meaning here? To compare, while using the Docker client, you can map ...
  • 6,762
12 votes
2 answers
3k views

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,...
  • 12.9k
5 votes
1 answer
3k views

What are best practices to override complete sections using docker-compose?

The docker-compose.override contains: volumes: - ./a:/path/to/a The docker-compose: volumes: - a:/path/to/a When docker-compose up is run the override overwrite the ./a overwrites the a. When ...
  • 12.9k
3 votes
1 answer
1k views

How to create a database backup using docker-compose

According to this documentation one could create a database backup docker-compose.admin.yml version: '3' services: dbadmin: build: db_data/ links: - db running docker-compose -f ...
  • 12.9k
14 votes
4 answers
7k views

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-...
  • 12.9k
43 votes
3 answers
45k views

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 ...
  • 12.9k

1 2 3 4
5