Red5d / docker-autocompose

Generate a docker-compose yaml definition from a running container
1.77k stars 197 forks source link

Not working anymore? #10

Closed SuperSpe closed 2 years ago

SuperSpe commented 4 years ago
ERROR: The Compose file './docker-compose.yaml' is invalid because:
services.nginx.networks.bridge contains null, which is an invalid type, it should be an array
services.portainer.networks.bridge contains null, which is an invalid type, it should be an array
services.grafana.labels.com.docker.compose.oneoff contains false, which is an invalid type, it should be a string, number,
or a null
services.influxdb.labels.com.docker.compose.oneoff contains false, which is an invalid type, it should be a string, number,
  nginx:
    networks:
      bridge:
        aliases:

Docker version 18.09.7, build 2d0083d

jisakiel commented 4 years ago
PonyOny commented 4 years ago

Same here getting this output error. services.web-server-test.networks.bridge contains null, which is an invalid type, it should be an array and is caused due to.

networks:
  bridge:
    external: true
Hukuma1 commented 3 years ago

Any fix for this besides manual editing? Seeing exactly the same 1 full year later. :/

Same here getting this output error. services.web-server-test.networks.bridge contains null, which is an invalid type, it should be an array and is caused due to.

networks:
  bridge:
    external: true
Red5d commented 3 years ago

Thanks for the reminder, somehow I thought I'd resolved this. I'll try and sort this out today.

akshaysalunke13 commented 3 years ago

@Red5d I've opened a PR solving this issue. Please have a look.

Red5d commented 3 years ago

Thanks! Merged.

Hukuma1 commented 3 years ago

Trying to do a Jellyfin container export/import and running into it complaining about this:

    devices:
      - CgroupPermissions: rwm
        PathInContainer: /dev/dri
        PathOnHost: /dev/dri

Log:

Deployment error
The Compose file '/data/compose/51/docker-compose.yml' is invalid because: services.Jellyfin2.devices contains an invalid type, it should be a string

Any idea? This is strictly the code I am using from a running container and then re-importing it (with different container name) to launch a stack.

Red5d commented 3 years ago

Hmm... that should definitely be formatted like this instead according to the compose file documentation:

devices:
  - /dev/dri:/dev/dri

I'll check and see if the "devices" section is different than others in the JSON or something. https://docs.docker.com/compose/compose-file/compose-file-v3/#devices

Hukuma1 commented 2 years ago

Any updates? It still says it. :/ Obviously can manually edit it for now, but others might not understand the failure if they run it.

Red5d commented 2 years ago

I've fixed the formatting on devices entries.