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
0 answers
493 views

Why can't Headless Chrome in Docker reach my Docker host, while curl can?

Context I am currently working on a PHP (Drupal) project for which I need to render a PDF. In the past I have worked with several PHP libraries to generate PDF's. While some work better than others, ...
vrijdenker's user avatar
1 vote
1 answer
819 views

Cloudformation template with EC2 using docker compose [closed]

I'm relatively new to Cloudformation, and had a few questions about my template and best practices. I'm facing a few hurdles, and there is a lot of information out there, it's a bit overwhelming, so ...
kvnam's user avatar
  • 121
0 votes
1 answer
2k views

Is it possible to create multiple tags out from docker-compose?

While creating a CI/CD via Azure Devops, my goal is to push two tags to the artifactory: latest build version (For example 1.0.X) My docker-compose looks like: version: '3.4' services: ...
Shahar Shokrani's user avatar
1 vote
1 answer
2k views

Why is my docker composer volume not working?

My volume isn't being created with the containers, this volume binds with the host, every time I try to attempt to run it or go to an online validator for yaml, it shows the correct validation on the ...
user36023's user avatar
0 votes
2 answers
580 views

Arguments in docker_compose.yml throwing error, but not with docker run

I am in some desperate help. I am atempting to translate this docker run command: docker run -d -p 5434:5432 --name postgres-2 livingdocs/postgres:14.4 standby -d "host=host.docker.internal port=...
Ash's user avatar
  • 101
1 vote
1 answer
3k views

bind mount from host not appearing in docker container when using compose

I have a bind mount at /home/quant/mounted_folder with a fstab like this: /mnt/d/some_folder /home/quant/mounted_folder none bind I can confirm that the folder mounts correctly on the host: DESKTOP-...
quant's user avatar
  • 155
2 votes
1 answer
1k views

How to don't start entrypoint command on "docker-compose up"?

I have multiple Docker containers in a project and I use docker-compose up -d to start containers. This is my docker-compose.yml file: version: "3" services: httpd: image: 'nginx:...
Ferenc Bablena's user avatar
-1 votes
0 answers
1k views

Errno 111 Connection refused error when trying to connect to mongodb container

I am trying to set up a flask app using nginx reverse proxy and my flask should be talking to mongodb backend but I can seem to be able to get mongodb to setup the default admin user so. I can connect ...
George Udosen's user avatar
0 votes
1 answer
5k views

How can I run apt-get update and apt-get upgrade commands automatically?

I have a docker container where I run a few commands as a root user each time it is created from an image. Is it possible to automate running these commands as a root administrator user each time my ...
Taras's user avatar
  • 105
2 votes
0 answers
821 views

How to colorize kubernetes logs?

It's easy enough to enable colorful logs on docker containers (by setting TERM=xterm-256color and running with tty: True). Still, I'm not getting any color when I run kubectl logs/stern on the ...
Jesse's user avatar
  • 121
-1 votes
0 answers
280 views

How to export directory out of a container to the host upon container exit?

I have a yaml file that creates four containers: three are selenium gird containers and the last contains a pytest script. It works the following way: I start the yaml file with the command: docker-...
Anatoly Rozhkov's user avatar
-1 votes
0 answers
40 views

Update to latest patch release using docker-compose

I would like to update gitlab automatically. Our docker-compose.yaml file looks like this: web: image: 'gitlab/gitlab-ee:latest' restart: always hostname: 'example.com' environment: ...
Håvard's user avatar
1 vote
0 answers
616 views

Docker Compose with VPN access

I am having problems in my docker container with a VPN connection: My container is unable to access internal hosts (which are available through VPN connection) I tried temporarily setting network_mode:...
gegham-ayvazyan's user avatar
0 votes
2 answers
6k views

How to connect from Docker container to the host?

My problem is that im trying to connect to a Docker host(Im running on Ubuntu) from a container. Ive tried several solutions including adding extra_hosts: host.docker.internal:host-gateway, but still ...
Joel's user avatar
  • 13
2 votes
0 answers
307 views

Run commands on docker container and sync automatically with host

I Dockerkized a MENN(Nextjs) stack App, now everything works fine. I run into issues when i need to install npm packages. let me first show you the structure src/server/Dockerfile FROM node:14-alpine ...
uneeb meer's user avatar
0 votes
2 answers
3k views

How to automate docker prune commands using crontab

Can someone help me on how to clean up containers and images which are 3 months older automatically by using crontab scheduling? Which type of method need to use for automation? I have manually tried ...
Hackaholic's user avatar
0 votes
2 answers
527 views

Mac M1 Docker Desktop no longer launches

I’ve been using Docker Desktop on my Mac M1 for over a year without trouble and just today it seems to have stopped working. It may have coincided with an update. When trying to open Docker Desktop by ...
Manachi's user avatar
  • 101
2 votes
1 answer
2k views

How to access a container/service port in swarm without publishing the port to the outside world?

It is possible to docker-compose to forward a port to the container from localhost only, by writing the desired ports configure in docker-compose.yml, e.g. 127.0.0.1:8080:80. In docker swarm this does ...
Олег's user avatar
0 votes
1 answer
3k views

How to connect my host to Redis cluster network on docker-compose

I'm running this docker-compose.yaml on my machine (Mac with docker desktop) but am not able to connect the cluster with redis-cli. I'm running it with docker-compose up --build I'm able to run redis-...
itamar's user avatar
  • 101
0 votes
1 answer
1k views

My Python application doesn't communicate with MySQL inside docker. Can someone help me?

The connection is not succeeding in docker. Look at my settings: Dockerfile FROM python:3.8.5-alpine WORKDIR /app COPY requirements.txt . RUN python3 -m pip install --upgrade pip RUN pip install -...
Flavio W.'s user avatar
1 vote
1 answer
3k views

docker-compose does not update /etc/hosts at build time

When building an image of a docker container I need to access a service on host localhost. It looks like --add-host option for docker command updates /etc/hosts both at image build time and container ...
dzieciou's user avatar
  • 111
2 votes
1 answer
118 views

Is it good or ok or a bad practice to add Dependency via a RUN command in Dockerfile?

I am trying to create an image using a multi-stage build for a node project. I am using NestJs for the project since it uses TypeScript, and if I install only production dependency in the production ...
Soheb's user avatar
  • 121
3 votes
3 answers
11k views

docker-compose exec does not execute command even when container is running

I have a docker-compose-custom.yml file like this: version: '3.8' services: myapp-back-preproduction: build: context: . container_name: myapp-back-preproduction image: 'myapp-back-...
Mik378's user avatar
  • 133
3 votes
1 answer
12k views

From inside a Docker container, how can I consume an API that is on the machine's localhost?

First of all, please forgive me if any information is missing or if my question does not meet the standards required by the site. I have very basic knowledge of docker, linux and networking and I am ...
Rafael Arend's user avatar
1 vote
1 answer
299 views

Lightweight alternative to healthchecks for flow-control in docker-compose

Currently I have a docker-compose.yaml which still contains depends_on with a condition. Unfortunately this feature got removed in newer versions. There is already a discussion here where some ...
science_buster's user avatar
0 votes
1 answer
269 views

Error when renaming docker-compose service [closed]

I'm new to docker-compose but my intuition is that it should not matter at all how a service is named, like a variable in a programming language. Is that correct and is there some obscure bug or is ...
Konrad Höffner's user avatar
5 votes
2 answers
11k views

DNS resolution fails when container is started via docker-compose

I recently decided to try out windows containers and i am using my private minecraft server for that purpose (as a hobby project). I have an image prepared, based on Windows Server Core 2022. When i ...
AdrianDeWinter's user avatar
0 votes
1 answer
78 views

Docker Swarm set which service goes to which machine

Docker Swarm set which service goes to which machine. Is there any way to set which service or service replicas goes to which worker machine ?
Krishna Torque's user avatar
0 votes
1 answer
129 views

CICD with dockerized web app

I am having troubles understanding the following DevOps concept. I have developed a dockerized web app using docker-compose. It is in my local and I can upload it to any cloud service I want and it ...
CarlosSR's user avatar
  • 101
2 votes
0 answers
570 views

Pipeline could not pull repo in GitLab CI/CD

I have a the repo with test CI pipeline, which is the following: # .gitlab-ci.yml image: name: gcc build: stage: build script: - echo 123 And it fails: Running with gitlab-runner 14.3.1 (...
Ivan's user avatar
  • 121
3 votes
1 answer
604 views

How to create network connection into remote docker stack?

I am struggling to set this up correctly. I am trying to run an app with docker stack deploy on a remote machine. The following app works, when I deploy it with docker swarm deploy on my windows ...
Soerendip's user avatar
  • 241
-1 votes
0 answers
1k views

Docker volume type cifs works OK with docker-compose write not allowed on swarm

I have a docker-compose.yml with this volume inside: volumes: xxx_media: driver: local driver_opts: type: cifs device: //10.1.1.3\Company$$\xxx o: "user=service.it@xxx....
Marco's user avatar
  • 99
1 vote
1 answer
379 views

Unable to use AWS ECS docker context in bitbucket pipelines deployment step

I'm trying to add a deployment step to bitbucket pipelines that works successfully when I simulate locally but fails when executing the steps in bitbucket. I have created a simple docker image that ...
Jason Redwood's user avatar
2 votes
1 answer
5k views

How to communicate between AWS ECS containers

Problem How do ECS containers communicate between each others? Situation I use docker compose ecs integration. In AWS docker context, docker compose up did a deploy correctly. But reverse proxy doesn'...
Omori's user avatar
  • 21
1 vote
0 answers
26 views

OS level Nginx that proxies to Dockers vs Dockers that each contain their own Nginx

Given a traditional Linux server ie- Ubuntu on a VPS and a commercial app that requires a handful of Docker containers each of which need to communciate to one another ... with one of those containers ...
Derrick's user avatar
  • 111
1 vote
1 answer
2k views

Using access tokens on Dockerfile to clone repository: RUN command error

In a Dockerfile, I'm trying to clone several Gitlab repositories that are specified in a file, one per line, using an access token passed as an environment variable set in docker-compose.yml: COPY my-...
dvilela's user avatar
  • 121
0 votes
1 answer
5k views

Initial file not found on docker-entrypoint

I want to run a container with docker-compose. My dockerfile is installing some stuff and at the end it looks like this: FROM adoptopenjdk/openjdk16 ... COPY ./myfiles /mydockerfiles ...
Cowboy_Patrick's user avatar
2 votes
2 answers
1k views

Log/Data rotation in Docker Container

My question is more on the concept or best practices to follow. I have two docker containers running InfluxDB and Grafana (monitoring applications). I have mounted external volume to each. now, the ...
Chandella07's user avatar
1 vote
1 answer
2k views

Docker compose up, Error starting userland proxy: listen tcp 0.0.0.0:22: bind: address already in use

I'm trying to a gitlab/gitlab-ce image up and running with docker-compose on macOS (Big Sur) (docker-compose up -d). I'm using docker-machine with the virtualBox driver. However, when starting the ...
Byron's user avatar
  • 111
0 votes
1 answer
2k views

How to change ownership of folder inside the container after build?

I have this service in my docker-compose.yml php-fpm: container_name: php_app restart: always build: context: . dockerfile: ./docker/php-fpm/Dockerfile volumes: - ./src:/var/www/html that take ...
sfarzoso's user avatar
  • 103
0 votes
1 answer
3k views

yarn server with docker-compose

So I am trying to start up an server that has: a mongodb container a backend container a client container Both server containers require me to run yarn start at the end. However, when I run this in ...
Flotolk's user avatar
  • 125
0 votes
1 answer
90 views

Continuous Deployment with jenkins

I am a beginner in DevOps. I created a continuous integration cycle using jenkins(docker image) and bitbucket. I used a simple spring boot hello-world project and after CI i got an executable Jar. I ...
Youssef Boudaya's user avatar
1 vote
1 answer
241 views

How to create a local network mapping in linux

I'm deploying nextcloud via docker, however the way the configuration is set up, it creates a subnetwork at 10.10.10.0/24 on the system it's running on instead of running it on 127.0.0.1. Then the ...
Cmertin's user avatar
  • 21
0 votes
2 answers
598 views

Docker: Let containers communicate to each other but don't expose to internet

I was recently shocked to find out that docker writes its own iptables rules and ignores ufw bindings completely. I had blocked all ports using the ufw deny incoming command and then selectively ...
Chris's user avatar
  • 1
0 votes
1 answer
221 views

Nginx healthcheck does not stop

I have the following healthcheck condition for a nginx container inside my docker-compose.yml file: healthcheck: test: ["CMD", "curl", "-f", "http://front-service:...
Leandro Battochio's user avatar
2 votes
3 answers
281 views

Can I use docker compose to run application container and its dependencies on google cloud or digital ocean, the same as locally?

I have a spring boot application, angular front end app, couchbase, and redis. They are all defined in a docker compose yaml file. I can make the application up and running locally. Is there a way to ...
user3377708's user avatar
0 votes
1 answer
731 views

docker mariadb access from remote

I created a docker container with docker-compose in my VPS and I want to access it from my local computer but the connection will refuse. also, I allowed the 3306 port in the VPS. my docker-compose....
Amir Sasani's user avatar
2 votes
3 answers
364 views

Where may I need Docker Compose as Kubernetes won the container orchestration war?

I found Docker Compose just release 1.28 on 2021-1-20 but as Kubernetes won the container orchestration war I am not sure where and why I may still need Docker Compose, under with case Docker Compose ...
Qiulang 邱朗's user avatar
2 votes
0 answers
489 views

Substitute env_file values with .env values on docker compose

Is it possible to substitute (without the use of external tools like envsubst) values in an environment file used in docker-compose (using env_file) with values on a .env file in the folder? Say I ...
Jcl's user avatar
  • 121
1 vote
1 answer
2k views

Isolate service networks with Docker Compose

I have two containerised services, A and B, with which I wish to isolate network communications with docker compose. There is also a shared service C which is not isolated from A or B and is free to ...
progress's user avatar