Docker Invalid tar header error when using Weston 4.4.0

I´ve tried this on 2 boards - a iMX8MP and a iMX8PP, with wireless network and cable network conenction - same behaviour:

$ cat docker-compose.yml 
services:
  weston:
    image: torizon/weston-imx8:4.4.0
    restart: always
    environment:
      - ACCEPT_FSL_EULA=1
    network_mode: host
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
      - type: bind
        source: /var/run/dbus
        target: /var/run/dbus
    cap_add:
      - CAP_SYS_TTY_CONFIG
    device_cgroup_rules:
      # ... for tty
      - "c 4:* rmw"
      # ... for /dev/input devices
      - "c 13:* rmw"
      - "c 199:* rmw"
      # ... for /dev/dri devices
      - "c 226:* rmw"

networks:
  my_network:
    driver: bridge  # Default network type


When trying to make Docker up:

$ docker-compose up -d
[+] Running 21/22
 ⠋ weston 21 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulling                          21.0s 
   ✔ 7ce705000c39 Pull complete                                                               1.6s 
   ✔ a62329c7e763 Download complete                                                           0.9s 
   ✔ fef9104c432a Download complete                                                           0.5s 
   ✔ ce3509a45411 Download complete                                                           1.4s 
   ✔ af86ba988785 Download complete                                                           1.5s 
   ✔ 52476e3671d1 Download complete                                                           2.3s 
   ✔ 8bd2e709ee38 Download complete                                                           7.1s 
   ✔ c87a2ed1765e Download complete                                                           7.1s 
   ✔ 26c7594e1e87 Download complete                                                           7.6s 
   ✔ 8bd8cbcbeaef Download complete                                                          12.7s 
   ✔ 08235cab289c Download complete                                                          12.7s 
   ✔ 7f18e99b00ac Download complete                                                          16.5s 
   ✔ 2c1ce468d9f3 Download complete                                                          14.2s 
   ✔ f8589f7d2f9d Download complete                                                          18.0s 
   ✔ a5af9b9e9dad Download complete                                                          15.1s 
   ✔ 98de9b7aa986 Download complete                                                          15.7s 
   ✔ dc1512c70125 Download complete                                                          17.0s 
   ✔ 45f74cd2f937 Download complete                                                          17.0s 
   ✔ 4843f6ec841e Download complete                                                          17.8s 
   ✔ 901b76ec2d78 Download complete                                                          18.0s 
   ✔ b9d920cbe7f6 Download complete                                                          18.3s 
failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header code here

Posts on the internet suggests to upgrade docker:

$ docker -v
Docker version 20.10.25-ce, build 911449ca24

TorizonOS version:

$ hostnamectl
 Static hostname: verdin-imx8mp-15128293
       Icon name: computer
      Machine ID: 5928f1d9776c4d8bb1210608b28b2842
         Boot ID: c306f6e0cea449f6a1b4e94d3155c016
Operating System: TorizonCore 6.7.0+build.18 (kirkstone)
          Kernel: Linux 5.15.148-6.7.0+git.bfdbfb2c85fb
    Architecture: arm64

Any ideas on how to solve this? Using previous version of weston (3.3.0) was fine. The problem happened when I upgraded weston to 4.4.0.

PS: ‘’‘apt’‘’ is not available to upgrade docker on TorizonOs

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello there!

It seems you’re encountering an issue with Docker image layers while setting up Weston on your NXP i.MX 8/8X/8M Mini-based SoM. Let’s try to resolve this together.

First, ensure you are using the correct Docker image for Weston by pulling it with the following command:

docker pull torizon/weston-imx8:$CT_TAG_WESTON

Next, start the Weston container using this command:

docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG \
             -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
             --device-cgroup-rules='c 4:* rmw' --device-cgroup-rules='c 13:* rmw' \
             --device-cgroup-rules='c 199:* rmw' --device-cgroup-rules='c 226:* rmw' \
             --device-cgroup-rules='c 253:* rmw' \
             torizon/weston-imx8:$CT_TAG_WESTON --developer  \
            --tty=/dev/tty7

If you continue to experience issues, here are some general troubleshooting steps:

  1. Check Docker Logs: Use docker logs weston to view any error messages that might provide more insight into the problem.

  2. Verify Image Integrity: Ensure the Docker image is not corrupted by removing it with docker rmi torizon/weston-imx8:$CT_TAG_WESTON and pulling it again.

  3. Update Docker: Make sure your Docker installation is up to date, as older versions might have bugs that could cause issues.

  4. Inspect Docker Daemon: Check the Docker daemon status with systemctl status docker to ensure it is running correctly.

By following these steps, you should be able to identify and resolve the issue. If you have any further questions, feel free to ask!

Best regards,
Toradex AI Assistant

Docker pull does not work neither:

$ docker pull torizon/weston-imx8:4.4.0         
4.4.0: Pulling from torizon/weston-imx8
7ce705000c39: Pull complete 
a62329c7e763: Extracting  6.013MB/6.013MB
fef9104c432a: Download complete 
ce3509a45411: Download complete 
af86ba988785: Download complete 
52476e3671d1: Download complete 
8bd2e709ee38: Download complete 
c87a2ed1765e: Download complete 
26c7594e1e87: Download complete 
8bd8cbcbeaef: Download complete 
08235cab289c: Download complete 
7f18e99b00ac: Download complete 
2c1ce468d9f3: Download complete 
f8589f7d2f9d: Download complete 
a5af9b9e9dad: Download complete 
98de9b7aa986: Download complete 
dc1512c70125: Download complete 
45f74cd2f937: Download complete 
4843f6ec841e: Download complete 
901b76ec2d78: Download complete 
b9d920cbe7f6: Download complete 
failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header

This is how I´ve solved. Upgraded the TorizonOS version, that came with an upgraded Docker version:

$ hostnamectl
 Static hostname: verdin-imx8mp-15128293
       Icon name: computer
      Machine ID: bd724ff3a6774fda8b46297e32538bc1
         Boot ID: 08cb21db69fc454e9e3cc356201ba06f
Operating System: Torizon OS 7.1.0+build.4 (scarthgap)
     CPE OS Name: cpe:/o:openembedded:torizon:7.1.0+build.4
          Kernel: Linux 6.6.54-7.1.0-g3493ccd66900
    Architecture: arm64
$ docker -v
Docker version 25.0.3, build 01f9332618

Docker can now download images - working fine - case closed.