With your compose file I was able to finally get to the bottom of this.
First of all I tried using the bundle
command. I got the same results as you with this. When using version: '2.4'
the command works fine but if I change it to version: '3.3'
then it fails like you said.
I then tried validating the compose file with docker-compose config
. Now here is where I get different results. On my laptop when I run docker-compose config
with version: '3.3'
I get the following output:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.weston: 'device_cgroup_rules'
Unsupported config option for services.kiosk: 'device_cgroup_rules'
Unsupported config option for services.nextjs-verdin: 'platform'
services.kiosk.depends_on contains an invalid type, it should be an array
With version: '2.4'
, the file validates fine. Now earlier you stated:
But syntax errors can be asily verified using
docker-compose -f docker-compose.yml config
and this is not the case (if version: 3.3
or version
doesn’t exist).
So I’m getting different behavior than you did here. I did some research to figure out why and here’s what I came up with. I found this issue on Github: device_cgroup_rules support removed in 3.x · Issue #8251 · docker/compose · GitHub
Similar validation issues as I got with your compose file. In that thread the issue was resolved by using a later version of docker-compose. On my laptop I have this version of docker-compose:
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
In the TorizonCore Builder container we use a Python package for docker-compose functionality with version “1.26.2”. As seen in the official repo here: https://github.com/toradex/torizoncore-builder/blob/bullseye/requirements_debian.txt
I re-built TorizonCore Builder using the latest version of the docker-compose python package (1.29.2), and this seems to fix things. The bundle
command now works with version: 3.3
or without any version specified at all. I guess the older versions of docker-compose have some weird bugs/quirks with them that were fixed in later versions.
I’ll make a request to our team to update the version of docker-compose used for TorizonCore Builder. In the meantime you can manually do this yourself as I did if you need this right away.
Best Regards,
Jeremias