Skip to content

jq: error: Could not open file /tmp/build_config/config.json: No such file or directory #255

@jubr

Description

@jubr

Hi fellas,

in case you've run in to addon build problems ending up in:

$ docker run --rm -it --name builder --privileged \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v ${PWD}:/data \
  ghcr.io/home-assistant/aarch64-builder
  -t /data --aarch64 --test

[21:56:07] INFO: No crossbuild support on host
[21:56:07] INFO: Using host docker setup with '/var/run/docker.sock'
[21:56:07] INFO: Run addon build for: aarch64
[21:56:07] INFO: No build information or from not provided. Using default base image.
jq: error: Could not open file /tmp/build_config/config.json: No such file or directory

Then there's a chance that docker silently failed to mount your addon volume! If there's a symlink somewhere in your pwd then this might trigger for you.

If this is the case, then the solution is a $(realpath ${PWD}) away:

$ docker run --rm -it --name builder --privileged \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v $(realpath ${PWD}):/data \
  ghcr.io/home-assistant/aarch64-builder
  -t /data --aarch64 --test

I hope this helps someone out there!

🍻 Cheers!



💪 Extra credit.

Set bashio log level with -e LOG_LEVEL=9: (not as helpful as one'd hope)

$ docker run --rm -it --name builder --privileged \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v $(realpath ${PWD}):/data \
  -e LOG_LEVEL=9 \
  ghcr.io/home-assistant/aarch64-builder \
  -t /data --aarch64 --test

As I documented in hassio-addons/bashio#162 earlier, combine set -x with bashio: (non-trivial, as it seems)

$ docker run --rm -it --name builder --privileged \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v $(realpath ${PWD}):/data \
  --entrypoint /bin/bash \
  ghcr.io/home-assistant/aarch64-builder \
  -x /usr/bin/bashio /usr/bin/builder.sh \
  -t /data --aarch64 --test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions