Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not parse compose YAML: exit status 14 #8

Open
Spider84 opened this issue May 13, 2022 · 7 comments
Open

Could not parse compose YAML: exit status 14 #8

Spider84 opened this issue May 13, 2022 · 7 comments

Comments

@Spider84
Copy link

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
@pierot
Copy link

pierot commented Aug 18, 2022

@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.

@mystbrent
Copy link

any solutions?

@marcelser
Copy link

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"

@steffen-kdab
Copy link

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.

@dtjohnson90
Copy link

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.

@xvrh
Copy link

xvrh commented Sep 1, 2024

Anyone found the reason of this error message?
We were happy to discover this tool but we can't use it, so sad 🥲

@petrolnt
Copy link

petrolnt commented Sep 7, 2024

Hey guys! You need to set label "docker-compose-watcher.file=/opt/docker-compose/www/docker-compose.yml" in controlled docker compose file same as mount path in compose-updater:

  www:
    image: 10.10.0.123:8082/www:latest
    restart: always
    ports:
      - 3001:3001
    networks:
      - my_network
    labels:
      - "docker-compose-watcher.watch=1"
      - "docker-compose-watcher.file=/opt/docker-compose/www/docker-compose.yml"
networks:
  my_network:
    external: true

and

  watcher:
    image: virtualzone/compose-updater
    restart: always
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/opt/docker-compose/www:/opt/docker-compose/www:ro"
      - "/opt/docker-compose/.docker/config.json:/root/.docker/config.json:ro"
    environment:
      INTERVAL: 1```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants