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
0 votes
2 answers
9 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=...
user avatar
  • 101
1 vote
1 answer
18 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-...
user avatar
  • 145
2 votes
1 answer
30 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:...
user avatar
0 votes
0 answers
10 views

Accessing Pelias Geocoder docker compose from other machine

Following this tutorial, I have a docker image running in a Linux machine, with the Pelias Geocoder service: https://github.com/pelias/docker I can access the service from the localhost, in a browser, ...
user avatar
0 votes
0 answers
147 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 ...
user avatar
0 votes
1 answer
50 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 ...
user avatar
  • 105
1 vote
0 answers
21 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 ...
user avatar
  • 11
0 votes
0 answers
22 views

What is LDAP and how it is configured in Docker containers?

Background- I am new to working with linux and docker, and I have been told to configure LDAP in a "oraclelinux-8 arm64v8" Docker image. (so that kerberos lookup can be done) What I have ...
user avatar
0 votes
0 answers
13 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-...
user avatar
0 votes
0 answers
17 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: ...
user avatar
0 votes
0 answers
28 views

How to create a service health in docker-compose that waits for another container to close

I'm creating a solution that uses NodeJS to generate a RESTFul API with express. This solution uses MySQL as a database and who manages the migrations and seeders of the database is the sequelize-cli ...
user avatar
0 votes
0 answers
85 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:...
user avatar
0 votes
1 answer
157 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 ...
user avatar
  • 13
0 votes
0 answers
32 views

Access Docker webserver that is port mapped to host IP 127.0.0.1:6443 -> tcp6443

I have a web-server running inside a docker container at port 6443, which I can access it from the docker-host machine using https://localhost:6443; Note the webserver upon connection redirects to ...
user avatar
  • 1
2 votes
0 answers
24 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 ...
user avatar
0 votes
0 answers
132 views

How in docker-compose do I bind a specific host IP address to a docker service for outgoing requests?

How in docker-compose do I bind a specific host IP address to a docker service if I want to send any http/https request from the docker service from that selected IP? For example host server has eth0, ...
user avatar
0 votes
2 answers
97 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 ...
user avatar
0 votes
0 answers
48 views

Deploy docker-compose to Azure

I have a spring application with my own dockerfile which I already pushed into a repository in Azure. This container on itself won't work since it needs a database connection. I was following this ...
user avatar
0 votes
1 answer
72 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 ...
user avatar
  • 101
0 votes
0 answers
11 views

How to change container's port to another one without reconfiguring the service inside of it and without mapping it to a port on the host machine?

I'm running a local DNS that automatically creates entries for docker images from their name. I want to be able to type "jira.test" in my browser address bar and have the web interface be ...
user avatar
1 vote
1 answer
165 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 ...
user avatar
0 votes
0 answers
16 views

Possibility to get rig of docker swarm

We use docker swarm only because of storing secrets purpose. I am investigating if we can either use another approach, docker-compose, for example and get rid of docker swarm or it is easier and ...
user avatar
  • 1
0 votes
0 answers
13 views

Windows Based Docker Images

I am in the middle of testing this: https://github.com/docker-archive/communitytools-image2docker-win, converting a VHD to a Docker Image. But based on what I am reading, it will only install ...
user avatar
0 votes
0 answers
239 views

Resolving permissions for Gitlab CI/CD for files written from Docker containers

My Gitlab CI/CD pipelines works on the first build with a clean home/gitlab-runner/builds directory, but on subsequent builds I get "rm: cannot remove '/home/gitlab-runner/builds/somefile': ...
user avatar
0 votes
1 answer
537 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-...
user avatar
  • 101
0 votes
1 answer
120 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 -...
user avatar
1 vote
1 answer
407 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 ...
user avatar
  • 111
0 votes
0 answers
43 views

Do the new changes to Docker licensing (with paid subscriptions) only apply to users of Docker Desktop?

Do the new changes to Docker licensing (with paid subscriptions) only apply to users of Docker Desktop? Reading the Docker FAQs regarding Updated Docker Subscription and Licensing Questions, it ...
user avatar
2 votes
1 answer
68 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 ...
user avatar
  • 121
1 vote
3 answers
2k 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-...
user avatar
  • 111
1 vote
1 answer
441 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 ...
user avatar
1 vote
1 answer
56 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 ...
user avatar
0 votes
1 answer
72 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 ...
user avatar
1 vote
2 answers
2k 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 ...
user avatar
0 votes
0 answers
19 views

How to load several environment variables without giving env and args only giving settings.env file in the Dockerfile?

NOTE: Here we don't use docker run command and docker-compose.yml only using dockerfile and settings.env how can we can achieve this requirement.
user avatar
0 votes
1 answer
34 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 ?
user avatar
0 votes
1 answer
73 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 ...
user avatar
  • 101
2 votes
0 answers
273 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 (...
user avatar
  • 121
0 votes
0 answers
9 views

pg_dump from Celery container differs from pg_dump everywhere else in other container

I can't understand where pg_dump version is coming from. I forced everywhere postrgresql-client-13 to be installed. /usr/bin/pg_dump --version Celery Beat and Celery pg_dump (PostgreSQL) 11.12 (...
user avatar
  • 101
0 votes
0 answers
88 views

Docker and Docker-Compose: Problem with InvalidVersion and API Version

My issue is that a docker-compose project (builds three docker images) works on a server A (ubuntu 18.04) but not on server B (ubuntu 14.04). The error I get on server B is the following: Traceback (...
user avatar
3 votes
1 answer
306 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 ...
user avatar
  • 171
0 votes
0 answers
587 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....
user avatar
  • 101
0 votes
0 answers
92 views

How to build an automated pipeline to AWS for a Django app in Github with more than one Dockerfile

I am completely new to DevOps. I have coded a few Django apps and I have been able to put them in production using Docker with nginx and uwsgi. The structure is -app/ --manage.py -proxy/ --Dockerfile -...
user avatar
  • 101
1 vote
1 answer
158 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 ...
user avatar
2 votes
1 answer
2k 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'...
user avatar
  • 21
0 votes
0 answers
36 views

How to route traffic from vps to kubernetes load balancer

I'm moving my project from docker compose setup to kubernetes setup. I've read a lot and view some tutorials but I'm stuck when it comes to sharing load balancer/ingress to the outside world. I always ...
user avatar
0 votes
0 answers
201 views

pm2 to start docker-compose

There is plenty of documentation and dicussion regarding running pm2 inside a Docker container. And general consensus seems that you use K8 or docker-compose to handle health checking/auto-restarts/...
user avatar
  • 111
1 vote
0 answers
23 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 ...
user avatar
  • 111
1 vote
1 answer
466 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-...
user avatar
  • 121
0 votes
1 answer
2k 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 ...
user avatar

1
2 3 4 5