compose-updater icon indicating copy to clipboard operation
compose-updater copied to clipboard

Could not parse compose YAML: exit status 14

Open Spider84 opened this issue 2 years ago • 7 comments

docker-compose parameter env_file: file.env have causing error

watcher_1    | 2022/05/13 22:34:08 Gathering details about running containers...
watcher_1    | 2022/05/13 22:34:08 Could not parse compose YAML: exit status 14

example:

 redis:
    image: redis:alpine
    restart: always
    env_file: file.env
    labels:
      - docker-compose-watcher.watch=1
      - docker-compose-watcher.dir=/home/docker

Spider84 avatar May 13 '22 22:05 Spider84

@virtualzone I have the same problem. If I validate the docker-compose file myself with docker compose -f docker-compose.yml config I get no errors returned.

pierot avatar Aug 18 '22 13:08 pierot

any solutions?

mystbrent avatar Dec 13 '22 10:12 mystbrent

same for me here I have a docker-compose file like this, also tried with just directory instead of file with no luck:

services:
  gentoo-distcc-tcp:
    container_name: gentoo-distcc-tcp
    image: "ksmanis/gentoo-distcc:tcp"
    command: --stats
    ports:
      - 3632-3633:3632-3633
    restart: unless-stopped
    labels:
      - "docker-compose-watcher.watch=1"
      - "docker-compose-watcher.file=/home/docker/gentoo-distcc/docker-compose.yml"

marcelser avatar Jun 28 '23 05:06 marcelser

Maybe I'm just stupid, but I had this error because I did not understand the purpose of the /home/docker bind mount. This needs to be the base dir of where you have your docker projects, in my case /opt/work/, or you'll get error 14.

steffen-kdab avatar Jan 16 '24 01:01 steffen-kdab

Do you mind explaining your solution a little more? My compose file looks like the following.

services:
  #Docker Compose Update
  updater:
    image: virtualzone/compose-updater
    container_name: updater
    restart: always
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/home/username:/home/docker:ro"
    environment:
      - interval=60

My /home/docker mount is where my compose file is located. I trade changing that mount to where my config folders are located, but I get the same error.

Not sure what i'm missing.

dtjohnson90 avatar Jan 26 '24 02:01 dtjohnson90