TorizonCore Docker Compose Error "http: invalid Host header"

Greetings Toradex forum users,

I am using the most recent Kirkstone 6.4.x version of TorizonCore on an Apalis IMX8 device. Running the docker-compose up command produces the following error message regardless of what is being built.

We would like to have docker compose working to deploy applications with it OTA. Individual investigation suggests this error may be related to a bug in the specific docker version that comes with TorizonCore 6. Any suggestions on how to resolve error? I have built TorizonCore with Yocto before. How would one go bumping up the Docker version?

Hey @Dolphindalt,

Are you able to share your docker-compose file? Running a simple hello-world on our end w/ TOS 6.4.0 appears to be in working order.

Also, can you confirm where you are trying to fetch your container images from? The last host header error is suggesting issues with the http request.


Hi Eric,

Here is the docker-compose file.

    build: .

As for the image, I am fetching FROM debian:latest. Trying to build the image with docker build . yields a http timeout error. It seems the issue is with http. I was able to pull and build the image previously. Any ideas on what to try?

Hey @Dolphindalt,

Are you able to validate the devices network connection? Also are there any possible firewalls that could be blocking access to docker?


Sorry for the slight hiccup; there was an issue with the file wall. docker build . is able to pull the image successfully now.

Docker compose up still fails with the same message.

The image fetching is fine with docker build but fails with docker compose up.

Hey @Dolphindalt,

It looks like there is a discrepancy between how the docker build . and docker-compose up
are building. And the issue is related to the buildkit. A workaround for now would be to avoid using the buildkit until we find a solution. (This process has been started).

DOCKER_BUILDKIT=0 docker-compose up

Will this work in the meantime?


Our docker-compose has been updated to 2.20.3, but right now this is only in our recent nightly Torizon OS builds. So if updating to a new nightly works for you, this issue should be resolved.


Excellent! Using DOCKER_BUILDKIT=0 docker-compose up is a successful workaround. For evaluation purposes, this work around will suffice for now.

I flashed the nightly build for Torizoncore (6.5.0-devel-20231130+build.447) and observe the same “http: invalid Host header” issue. Maybe I am using the wrong release.

Regardless, this temporary fix works for our purposes. Thank you Eric for your quick support.

I flashed the nightly build for Torizoncore (6.5.0-devel-20231130+build.447) and observe the same “http: invalid Host header” issue. Maybe I am using the wrong release.

Strange for me on this exact same release it works:

torizon@apalis-imx8-06738453:~$ cat /etc/issue
TorizonCore 6.5.0-devel-20231130+build.447 \n \l

torizon@apalis-imx8-06738453:~$ cat Dockerfile
FROM debian:latest
torizon@apalis-imx8-06738453:~$ cat docker-compose.yml
    build: .
torizon@apalis-imx8-06738453:~$ docker-compose up
[+] Building 17.2s (4/5)                                                                                                                      docker:default
 => [application internal] load build definition from Dockerfile                                                                                        0.0s
 => => transferring dockerfile: 56B                                                                                                                     0.0s
 => [application internal] load .dockerignore                                                                                                           0.1s
 => => transferring context: 2B                                                                                                                         0.0s
 => [application internal] load metadata for                                                                            1.0s
 => [application 1/1] FROM                     16.0s
 => => resolve                                  0.1s
 => => sha256:133a1f2aa9e55d1c93d0ae1aaa7b94fb141265d0ee3ea677175cdb96f5f990e5 1.85kB / 1.85kB                                                          0.0s
 => => sha256:d5b8b8122eed5f63ac8b1d57374014a52f3ad833c8dc7f21789d3307e91dc98b 529B / 529B                                                              0.0s
 => => sha256:a588e7890234b6fef5263d7ae1fcbff8ba952ff933fc7cb53a498a6623536aba 1.48kB / 1.48kB                                                          0.0s
 => => sha256:df2021ddb7d686bdbb125598b2a6163d63035f080356b3014595f354ea0b40d6 49.61MB / 49.61MB                                                        4.4s
 => => extracting sha256:df2021ddb7d686bdbb125598b2a6163d63035f080356b3014595f354ea0b40d6                                                               9.0s
 => [application] exporting to image                                                                                                                    0.1s
 => => exporting layers                                                                                                                                 0.0s
 => => writing image sha256:aafbb7c9d4bcd6fad8170cf73a53436c622d0fd11b245dabbb1f66b4aef52425                                                            0.1s
 => => naming to                                                                                                  0.0s
[+] Running 2/2
 ✔ Network torizon_default          Created                                                                                                             0.3s
 ✔ Container torizon-application-1  Created                                                                                                            10.9s
Attaching to torizon-application-1
torizon-application-1 exited with code 0

Best Regards,