Excerpt
IndexError: list index out of range
[64914] Failed to execute script docker-compose

## Description of the issue
docker-compose build (in two separate projects) fails
## Context information (for bug reports)
Output of docker-compose version
```plain text
$ docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
```
Output of docker version
```plain text
(paste here)
```
Output of docker-compose config (Make sure to add the relevant -f and other flags)
```plain text
docker-compose config
services:
server:
build:
context: /home/leeh/code/stuart/gov-arch-modelling
command:
- java
- -Djava.awt.headless=true
- -jar
- /plantuml.jar
- -picoweb
ports:
- published: 8095
target: 8080
version: '3.9'
```
## Steps to reproduce the issue
1. Run any docker-compose build
2. Observe failure as denoted
### Observed result
Build fails with a python error, in my limited debugging capabilties, I have traced that to a fault with the iidfile being empty in class _CLIBuilder's build function. Line #1950 https://github.com/docker/compose/blob/master/compose/service.py#L1948-L1951
### Expected result
Build succeeds
### Stacktrace / full error message
```plain text
docker-compose build
Building server
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
[+] Building 2.1s (7/7) FINISHED
=> [internal] load build definition from Dockerfile 0.3s
=> => transferring dockerfile: 789B 0.0s
=> [internal] load .dockerignore 0.3s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/openjdk:17-jdk-alpine3.14 1.4s
=> [1/4] FROM docker.io/library/openjdk:17-jdk-alpine3.14@sha256:4b6abae565492dbe9e7a894137c966a7485154238902f2f25e9dbd9784383d81 0.3s
=> => resolve docker.io/library/openjdk:17-jdk-alpine3.14@sha256:4b6abae565492dbe9e7a894137c966a7485154238902f2f25e9dbd9784383d81 0.2s
=> CACHED [2/4] RUN apk add --no-cache graphviz-dev wget ca-certificates ttf-dejavu fontconfig && wget "http://downloads.sourceforge.net/project/plantuml/1.2021.9/plantuml.1.2021.9.jar" -O plantuml.jar & 0.0s
=> CACHED [3/4] RUN ["java", "-Djava.awt.headless=true", "-jar", "/plantuml.jar", "-version"] 0.0s
=> CACHED [4/4] RUN ["dot", "-version"] 0.0s
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 203, in perform_command
File "compose/metrics/decorator.py", line 18, in wrapper
File "compose/cli/main.py", line 380, in build
File "compose/project.py", line 519, in build
File "compose/project.py", line 501, in build_service
File "compose/service.py", line 1133, in build
File "compose/service.py", line 1950, in build
IndexError: list index out of range
[64914] Failed to execute script docker-compose
```
## Additional information
Docker Compose from RPM (at 1.27, or .28 or something) or from the curl|bash install method
The error goes away if I disable buildkit explicitly (e.g export COMPOSE_DOCKER_CLI_BUILD=0) however my build depends upon the -mount option to share an SSH key socket with one of my builds, so I cannot build my actual project.