I am facing error in Docker Compose. The compose file is
version: '2'
services:
api:
build:
context: .
dockerfile: webapi/dockerfile
ports:
- 210
web:
build:
context: .
dockerfile: app/dockerfile
ports:
- 80
lbapi:
image: dockercloud/haproxy
links:
– api
ports:
– 8080:210
lbweb:
image: dockercloud/haproxy
links:
– web
ports:
– 80:80
The error when running docker-compose up
is:
ERROR: The Compose file '.\docker-compose.yml' is invalid because:
services.lbapi.ports contains an invalid type, it should be an array
services.lbweb.ports contains an invalid type, it should be an array
services.lbapi.links contains an invalid type, it should be an array
services.lbweb.links contains an invalid type, it should be an array
Please help.
- docker-compose version 1.8.0-rc1, build 9bf6bc6
- docker-py version: 1.8.1
- CPython version: 2.7.11
- OpenSSL version: OpenSSL 1.0.2d 9 Jul 2015