Validating /home/jenkins/jenkins-data/docker-compose.yml: (root) Additional property build is not allowed

Hi,

Could you please help on below error?

[jenkins@localhost jenkins-data]$ cat docker-compose.yml
version: ‘3.8’
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins
volumes:
- “$PWD/jenkins_home:/var/jenkins_home”
ports:
- “8080:8080”
remote_host:
container_name: remote-host
image: remote-host
build:
context: centos9
[jenkins@localhost jenkins-data]$ docker compose build
validating /home/jenkins/jenkins-data/docker-compose.yml: (root) Additional property build is not allowed
[jenkins@localhost jenkins-data]$
[jenkins@localhost jenkins-data]$ cat docker-compose.yml
version: ‘3.8’
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins
volumes:
- “$PWD/jenkins_home:/var/jenkins_home”
ports:
- “8080:8080”
remote_host:
container_name: remote-host
image: remote-host
build:
context: centos9
[jenkins@localhost jenkins-data]$ docker compose build
validating /home/jenkins/jenkins-data/docker-compose.yml: (root) Additional property build is not allowed
[jenkins@localhost jenkins-data]$


Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

```
services:
  service1:
    image: image1
```