Trying to use a docker-compose.yml file to build three images and containers. But I’m running into a strange error and I can’t find what is wrong.
My docker-compose.yml file:
version: '2' services: GabeThermDB: build: context: ./GabeThermDB dockerfile: Dockerfile GabeThermApache: build: context: ./GabeThermApache dockerfile: Dockerfile ports: - "80:80" GabeThermPHPMyAdmin: build: context: ./GabeThermPHPMyAdmin dockerfile: Dockerfile ports: - "8080:80"
When I run docker-compose up, I get the following errors:
ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
services.GabeThermPHPMyAdmin.build contains unsupported option: 'ports’
services.GabeThermApache.build contains unsupported option: ‘ports’
I can’t see what is wrong. I already removed all the tabs by spaces.