Skip to content
masterclass Buddy

Docker · Directive

ENV

A Docker Compose service defines how to create and run one kind of container. Services are declared under the required top-level services map and can configure images, builds, ports, environment variables, dependencies, and storage.

Last updated

Syntax

services:
  SERVICE_NAME:
    image: IMAGE
    # other service options

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • build
  • command
  • configs
  • depends_on
  • entrypoint
  • environment
  • env_file
  • expose

Source: Define services in Docker Compose. Checked 2026-11-03.