When using docker compose OCI artifact, parameter --project-directory does not work for resolving relative volume paths
Description
I have the following docker compose artifact I am attempting to run with this command.
docker compose \
-f "oci://docker.io/usdotfhwaops/v2xhub-application:develop" \
--env-file "/home/dev/cdasim-scenario-runner/tmp/.env.street_1" \
-p "street_1" --project-directory "/home/dev/cdasim-scenario-runner/tmp/" \
up -d --yes --force-recreate Under the /home/dev/cdasim-scenario-runner/tmp directory I have local configuration files that are intended to get volumed into my services using relative paths. One example is here where I volume a .sql file into my mysql service to initialize my database from a relative path.
When running this however and inspecting the containers I see the following resolution for this volume path
"Mounts": [
{
"Type": "bind",
"Source": "/home/dev/.cache/docker-compose/f22c7d5e9d784c051618dd5ae2b75a2c8132cefffe0c9aaed666a0ae8f1ab702/v2xhub_db_init_street_1",
"Destination": "/docker-entrypoint-initdb.d",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},This --project-directory parameter works fine for local docker compose files and there is nothing in the documentation of the CLI parameter or the docker compose OCI artifacts that to me suggests that this should not work . Am I missing something?
Steps To Reproduce
Run
docker compose \
-f "oci://docker.io/usdotfhwaops/v2xhub-application:develop" \
--env-file "/home/dev/cdasim-scenario-runner/tmp/.env.street_1" \
-p "street_1" --project-directory "/home/dev/cdasim-scenario-runner/tmp/" \
up -d --yes --force-recreate Compose Version
Docker Compose version v5.5.1
Docker Environment
Client: Docker Engine - Community
Version: 29.8.0
API version: 1.56
Go version: go1.26.8
Git commit: 88096ef
Built: Thu Sep 3 21:50:45 2026
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.8.0
API version: 1.56 (minimum version 1.40)
Go version: go1.26.8
Git commit: 3ce5872
Built: Thu Sep 3 21:50:45 2026
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.3.5
GitCommit: 1294c24a7da8e5a793ed378161673abe94118892
runc:
Version: 1.5.1
GitCommit: v1.5.1-0-g8f2685a4
docker-init:
Version: 0.19.0
Anything else?
No response
Source: docker/compose