Docker Compose file · Services

Use an image or build one

Pull an image, or build from a folder with build arguments.

services:
  api:
    build:
      context: ./api
      dockerfile: Dockerfile
      args:
        NODE_ENV: production
  cache:
    image: redis:8

Official Docker Compose file documentation

More services commands

All services commands · Docker Compose file cheatsheet

Was this page helpful?