docker-compose: only validate YAML, don't follow path or resolve .env files

46 views Asked by At

I have a gitea-instance with Actions (like GitHub Actions) and want to validate docker-compose.yml files before deploying them onto the server. I have found in the docs the parameter --no-path-resolution and this works fine with the volume-binds (I'm mounting path and not using volumes), but not with .env files.

Gitea workflow:

sudo docker compose config --no-path-resolution > /dev/null

Results in:

Failed to load ./data/app/.env: open ./data/app/.env: no such file or directory

How can I tell docker compose to ignore the .env file, and just validate the YAML format?

0

There are 0 answers