🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 6 Min Lesezeit
0

DOCKER and DOCKER COMPOSE: Run Dependencies Without Installing Them in Your Environment

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht
📺
dev.to

to use the registry










What is Docker Compose?



Docker Compose is a tool for defining and running multi-container Docker applications. With Docker Compose, you use a YAML file (docker-compose.yml) to configure your application's services, networks, and volumes.






Key Features of Docker Compose:




  1. Multi-Container Management: Allows you to orchestrate multiple services (e.g., a web server, database, and message broker) as part of a single application.


  2. Declarative Configuration: Use a YAML file to describe how services should run, including networking, dependencies, and volumes.


  3. Simplified Commands: You can start all services defined in the Compose file with a single command (docker-compose up).










How Docker and Docker Compose Work Together




  • Docker is the foundation that provides containerization.


  • Docker Compose is an orchestration tool that makes it easier to manage multi-container setups.







Example Workflow:




  1. You define your application's architecture in a docker-compose.yml file.


  2. You run docker-compose up, which starts all services as containers.


  3. Docker Compose manages the dependencies, networks, and volumes for you.










Comparison of Docker and Docker Compose






The following configurations are for the project for more details!







Summary of the Setup




  • Postgres: Database service storing and managing relational data.


  • PgAdmin: User-friendly web-based interface to manage the PostgreSQL database.


  • RabbitMQ: A message broker for handling communication between services.


  • Volumes: Persist data for Postgres and RabbitMQ.


  • **Networks:88 Enable secure and direct communication between the services.





  1. Postgres



Sets up a PostgreSQL database.




CODE
services:
...

postgres:
image: postgres:16
container_name: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- '5432:5432'
networks:
- msnetwork
volumes:
- postgres_data:/var/lib/postgresql/data

...

volumes:
postgres_data:
...

networks:
msnetwork:
driver: bridge







  • image: postgres:16

    Specifies the Docker image for PostgreSQL version 16.


  • container_name: postgres

    Names the container postgres for easier reference.


  • restart: always

      Ensures the container restarts automatically if it crashes.


  • environment

      Configures environment variables to initialize the database:


  • POSTGRES_USER: Sets the database user to postgres.


  • POSTGRES_PASSWORD: Sets the password for the user.


  • POSTGRES_DB: Creates a default database named postgres.


  • ports

      Maps port 5432 inside the container (PostgreSQL's default port) to port 5432 on the host machine.


  • networks

      Connects the container to the msnetwork, enabling communication with other services in the same network.


  • volumes

      Maps the volume postgres_data to /var/lib/postgresql/data, which persists the database's data outside the container.





  1. PgAdmin



Provides a graphical interface for managing PostgreSQL.




CODE
services:
...

pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
ports:
- '8000:80'
networks:
- msnetwork
environment:
CHECK_EMAIL_DELIVERABILITY: false
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: tests-pg-admin

...

networks:
msnetwork:
driver: bridge







  • image: dpage/pgadmin4

      Specifies the official PgAdmin 4 image.


  • container_name: pgadmin

      Names the container pgadmin.


  • ports

      Maps port 80 inside the container (PgAdmin's default port) to port 8000 on the host, allowing access through .


  • networks

      Connects the container to msnetwork.


  • volumes

      Maps the volume rabbitmq_data to /var/lib/rabbitmq, persisting RabbitMQ configurations and queues.


  • environment

      Sets environment variables for RabbitMQ setup:


  • RABBITMQ_DEFAULT_USER: Defines the default admin username.


  • RABBITMQ_DEFAULT_PASS: Defines the admin password.










Volumes



Volumes persist data outside containers, ensuring that data is not lost when containers are recreated.




  • postgres_data

      Stores the PostgreSQL database files.


  • rabbitmq_data

      Stores RabbitMQ configurations and message queues.







Networks



Networks allow containers to communicate with each other.




  • msnetwork

      A custom network was created using the bridge driver. It isolates the services and allows them to communicate directly using their

    container names.


  • driver: bridge: Specifies the type of network.







Docker Compose Networks



In Docker Compose, networks are used to connect containers, enabling them to communicate directly. Docker supports several types of networks, each with unique characteristics and use cases.






Networks in Docker Compose



In the docker-compose.yml file, you can configure networks to:




  • Isolate services: Create independent environments where only services in the same network can communicate.


  • Share networks: Allow containers to share communication with other containers or even the host.







The Final Docker Compose file






CODE
services:
postgres:
image: postgres:16
container_name: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- '5432:5432'
networks:
- msnetwork
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql

pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
ports:
- '8000:80'
networks:
- msnetwork
environment:
CHECK_EMAIL_DELIVERABILITY: false
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: tests-pg-admin

rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management
ports:
- '5672:5672'
- '15672:15672'
networks:
- msnetwork
volumes:
- rabbitmq_data:/var/lib/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password

volumes:
postgres_data:
rabbitmq_data:

networks:
msnetwork:
driver: bridge












Conclusion



Docker and Docker Compose are powerful tools that simplify containerized application development and deployment. By understanding what they are and how they work, you can streamline your workflows and improve the efficiency of managing complex environments. From defining your services in a simple YAML file to running everything with a single command, Docker Compose makes orchestrating multi-container applications accessible and efficient. If you're new to Docker, we hope this article has given you a solid foundation to get started.









Thanks



Thank you for taking the time to read this article! If you found it helpful, we encourage you to explore more about this project on for in-depth tutorials and examples. Happy coding!

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten DOCKER and DOCKER COMPOSE: Run Dependencies Without Installing Them in Your Environment

Thematisch verwandte Begriffe: DOCKER, COMPOSE, Dependencies, Without · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...