Docker-compose fails to execute in AKS

Hi,

Help please! I can’t quite understand why docker-compose fails to execute in an AKS container :frowning: . Currently this is the output of the docker-compose command:

root@ado-agent-5dc44f99-6ppnk:/azp/agent/_work/1/s# docker-compose run --rm terraform2
Pulling terraform2 (hashicorp/terraform:light)...
light: Pulling from hashicorp/terraform
c9b1b535fdd9: Pull complete
de7e97a272b4: Pull complete
96f252e89940: Pull complete
Digest: sha256:5e19b9bab0b6d079cae8822be22cd7010f65177356600154b77fc4fc81bdde31
Status: Downloaded newer image for hashicorp/terraform:light
Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 72, in main
  File "compose/cli/main.py", line 128, in perform_command
  File "compose/cli/main.py", line 865, in run
  File "compose/cli/main.py", line 1349, in run_one_off_container
  File "compose/cli/main.py", line 1469, in call_docker
  File "subprocess.py", line 339, in call
  File "subprocess.py", line 800, in __init__
  File "subprocess.py", line 1462, in _execute_child
  File "os.py", line 810, in fsencode
TypeError: expected str, bytes or os.PathLike object, not NoneType
[1077] Failed to execute script docker-compose
root@ado-agent-5dc44f99-6ppnk:/azp/agent/_work/1/s#

The contents of the docker-compose.yml are as follows:

---
version: '3.0'
services:
  terraform2:
    image: hashicorp/terraform:light
    user: root
    env_file: .env
    working_dir: /opt/
    volumes:
      - .:/opt:rw
      - ~/.azure:/root/.azure

Thanks in advance.