Skip to main content
The 2024 Developer Survey results are live! See the results

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
654 votes
20 answers
649k views

Docker Compose wait for container X before starting Y

I am using rabbitmq and a simple python sample from here together with docker-compose. My problem is that I need to wait for rabbitmq to be fully started. From what I searched so far, I don't know how ...
svenhornberg's user avatar
  • 15.5k
657 votes
21 answers
557k views

Communication between multiple docker-compose projects

I have two separate docker-compose.yml files in two different folders: ~/front/docker-compose.yml ~/api/docker-compose.yml How can I make sure that a container in front can send requests to a ...
Jivan's user avatar
  • 22.6k
5 votes
1 answer
1k views

"Unknown host" error calling containerized backend from frontend

I'm building a containerized application where both the frontend and backend are served from the same Compose file: version: '3.8' services: frontend: build: ./frontend ports: ['8001:80'] ...
David Maze's user avatar
  • 150k
1224 votes
28 answers
1.5m views

How to fix docker: Got permission denied issue

I installed Docker in my machine where I have Ubuntu OS. When I run: sudo docker run hello-world All is ok, but I want to hide the sudo command to make the command shorter. If I write the command ...
Carlos Andres's user avatar
31 votes
4 answers
50k views

Docker Compose + Spring Boot + Postgres connection

I have a Java Spring Boot app which works with a Postgres database. I want to use Docker for both of them. I initially put just the Postgres in Docker, and I had a docker-compose.yml file defined like ...
typos's user avatar
  • 6,402
195 votes
10 answers
173k views

How do you perform Django database migrations when using Docker-Compose?

I have set up a Docker Django/PostgreSQL app closely following the Django Quick Start instructions on the Docker site. The first time I run Django's manage.py migrate, using the command sudo docker-...
John's user avatar
  • 5,973
325 votes
42 answers
958k views

Docker Error bind: address already in use

When I run docker-compose up in my Docker project it fails with the following message: Error starting userland proxy: listen tcp 0.0.0.0:3000: bind: address already in use netstat -pna | grep 3000 ...
Ngoral's user avatar
  • 4,634
634 votes
14 answers
692k views

Interactive shell using Docker Compose

Is there any way to start an interactive shell in a container using Docker Compose only? I've tried something like this, in my docker-compose.yml: myapp: image: alpine:latest entrypoint: /bin/sh ...
drubb's user avatar
  • 15.5k
291 votes
21 answers
224k views

Docker-compose: node_modules not present in a volume after npm install succeeds

I have an app with the following services: web/ - holds and runs a python 3 flask web server on port 5000. Uses sqlite3. worker/ - has an index.js file which is a worker for a queue. the web server ...
KGo's user avatar
  • 19.7k
984 votes
5 answers
675k views

What is the difference between ports and expose in docker-compose?

What is the difference between ports and expose options in docker-compose.yml?
Bibek Shrestha's user avatar
992 votes
21 answers
1.2m views

Docker Compose - How to execute multiple commands?

I want to do something like this where I can run multiple commands in the following code: db: image: postgres web: build: . command: python manage.py migrate command: python manage.py ...
RustyShackleford's user avatar
53 votes
2 answers
34k views

Docker app server ip address 127.0.0.1 difference of 0.0.0.0 ip

He everyone. I'm working with docker and trying to dockerize a simple django application that does an external http connect to a web page (real website) so when I set in the Docker file the address of ...
Velidan's user avatar
  • 5,869
205 votes
20 answers
213k views

Docker-compose check if mysql connection is ready

I am trying to make sure that my app container does not run migrations / start until the db container is started and READY TO accept connections. So I decided to use the healthcheck and depends on ...
John Kariuki's user avatar
  • 5,516
65 votes
10 answers
37k views

Docker-compose no longer building image (AttributeError: cython_sources)

I am building a django-react site and suddenly my docker-compose no longer builds despite any changes to requirements or image versions. My requirements.txt looks as follows: Django>=3.2.4,<4.0 ...
Marco Sousa's user avatar
575 votes
21 answers
793k views

How to mount a single file in a volume

I am trying to dockerize a PHP application. In the dockerfile, I download the archive, extract it, etc. Everything works fine. However, if a new version gets released and I update the dockerfile, I ...
Jakub Juszczak's user avatar

15 30 50 per page
1
2 3 4 5
165