# Docker Compose (Data Engineering) > Arquivo docker-compose.yml, services, depends_on, healthchecks, volumes compartilhados, networks, variáveis de ambiente, profiles - 20 perguntas de entrevista - Mid-Level - [Perguntas de entrevista: Data Engineering](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista.md) ## 1. Qual é o papel principal de um arquivo docker-compose.yml? **Resposta** O arquivo docker-compose.yml permite definir e executar aplicações Docker multi-container. Ele descreve os services, suas imagens, volumes, networks e dependências em um formato YAML declarativo. Isso simplifica a inicialização de ambientes complexos com um único comando docker compose up. ## 2. Qual comando inicia todos os services definidos em docker-compose.yml em segundo plano? **Resposta** O comando docker compose up -d inicia todos os services em modo detached (daemon). A flag -d permite que os containers rodem em segundo plano, liberando o terminal. Sem essa flag, os logs de todos os services são exibidos no terminal e parar o processo para os containers. ## 3. Como definir um volume nomeado compartilhado entre múltiplos services em docker-compose.yml? **Resposta** Os named volumes são declarados em uma seção volumes: no nível raiz do arquivo, depois referenciados em cada service. Diferente dos bind mounts, os named volumes são gerenciados pelo Docker e persistem independentemente dos containers. Eles permitem compartilhamento confiável de dados entre services. ## Mais 17 perguntas disponiveis - Qual é a diferença entre depends_on e healthcheck no Docker Compose? - Como configurar um healthcheck para um service PostgreSQL em docker-compose.yml? Cadastre-se gratis: https://sharpskill.dev/pt/login ## Outros temas de entrevista Data Engineering - [Linux & Shell - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/linux-shell-basics.md): 20 perguntas, Junior - [Git & GitHub - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/git-github-fundamentals.md): 20 perguntas, Junior - [Python avançado para Data Engineering](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/python-advanced-de.md): 25 perguntas, Junior - [Docker - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/docker-fundamentals.md): 25 perguntas, Junior - [Google Cloud Platform - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/gcp-fundamentals.md): 20 perguntas, Junior - [CI/CD e qualidade de código](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/ci-cd-code-quality.md): 20 perguntas, Mid-Level - [FastAPI - APIs de dados](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/fastapi.md): 20 perguntas, Mid-Level - [SQL avançado para Data Engineering](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/sql-advanced-de.md): 20 perguntas, Mid-Level - [Data Lake - Arquitetura e ingestão](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/data-lake.md): 20 perguntas, Mid-Level - [BigQuery para Data Engineering](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/bigquery-de.md): 20 perguntas, Mid-Level - [PostgreSQL - Administração](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/postgresql-admin.md): 20 perguntas, Mid-Level - [Data Modeling para Data Engineering](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/data-modeling-de.md): 20 perguntas, Mid-Level - [Fivetran & Airbyte - Ingestão de dados](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/fivetran-airbyte.md): 20 perguntas, Mid-Level - [dbt - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/dbt-fundamentals-de.md): 20 perguntas, Mid-Level - [Apache Airflow - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/airflow-fundamentals.md): 20 perguntas, Mid-Level - [Kubernetes - Fundamentos](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/kubernetes-fundamentals.md): 20 perguntas, Mid-Level - [dbt - Recursos avançados](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/dbt-advanced-de.md): 20 perguntas, Senior - [Padrões ETL / ELT / ETLT](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/etl-elt-patterns.md): 20 perguntas, Senior - [Apache Airflow - Avançado](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/airflow-advanced.md): 20 perguntas, Senior - [Airflow + dbt - Orquestração de pipelines](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/airflow-dbt-integration.md): 20 perguntas, Senior - [PySpark - Processamento em grande escala](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/pyspark.md): 20 perguntas, Senior - [Google Pub/Sub - Streaming de dados](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/pubsub-streaming.md): 20 perguntas, Senior - [Apache Beam & Dataflow](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/apache-beam-dataflow.md): 20 perguntas, Senior - [Kubernetes - Produção e escalabilidade](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/kubernetes-advanced.md): 20 perguntas, Senior - [Terraform - Infrastructure as Code](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/terraform.md): 20 perguntas, Senior - [Bancos de dados NoSQL](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/nosql-databases.md): 20 perguntas, Senior - [Arquitetura Data moderna](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/data-architecture.md): 20 perguntas, Senior - [Monitoramento e observabilidade](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/monitoring-observability.md): 20 perguntas, Senior - [IAM e segurança de dados](https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/iam-security-de.md): 20 perguntas, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/technologies/data-engineering/perguntas-entrevista/docker-compose