Unsupported config option for services.db: 'images'

坚强是说给别人听的谎言 提交于 2020-04-30 11:43:22

问题


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.


回答1:


It should be image not images.



来源:https://stackoverflow.com/questions/55858549/unsupported-config-option-for-services-db-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!