简体   繁体   中英

Unsupported config option for services.db: 'images'

I am trying to learn how to utilize docker-compose and was following instructions until I received an error. Here's my docker-compose file.

version: '3.7'

services:
  web:
    build: ./app
    command: python /usr/src/app/manage.py runserver 0.0.0.0:8000
    volumes:
      - ./app/:/usr/src/app/
    ports:
      - 8000:8000
    environment:
      - SECRET_KEY=my_secret_key
      - SQL_ENGINE=django.db.backends.postgresql
      - SQL_DATABASE=postgres
      - SQL_USER=postgres
      - SQL_PASSWORD=postgres
      - SQL_HOST=db
      - SQL_PORT=5432
    depends_on:
      - db
  db:
    images: postgres:10.7-alpine
    volumes:
      - postgres_data:/var/lib/postgresql/data/

volumes:
  postgres_data:

When I go back and enter "docker-compose up -d --build", I would get an error saying

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.db: 'images'

I think I have the indentation correct and 'images' look okay to me. My docker-compose version is 1.23.2 and trying to run this on Mac. Any ideas? thanks in advance.

应该是image 而不是 images

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM