Docker pull failed starting from version 2.2.5

Describe the problem/error/question

Hello, everyone !

I have been using Docker to deploy the n8n project. Recently, when I was preparing to update to the latest version 2.2.5, the Docker pull operation failed and I was unable to pull the latest image.

Error message is : ·ERROR: failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header·

root@r730:~/docker-srv/n8n# docker-compose up -d
Pulling n8n (docker.n8n.io/n8nio/n8n:2.2.6)...
2.2.6: Pulling from n8nio/n8n
bc0cdc8ecc2f: Extracting [==================================================>]   1.89kB/1.89kB
66d634619c1c: Download complete
f860243118e9: Download complete
7ebb9aff85fe: Download complete
218829d6d7f2: Download complete
9cd9f54f6da2: Download complete
e628b015b66d: Download complete
4f4fb700ef54: Download complete
a6ec7778f367: Download complete
e0da1fc8609b: Download complete
09d55225fc4f: Download complete
88efbedad21b: Download complete
ERROR: failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header
root@r730:~/docker-srv/n8n# 

This is my docker version

root@r730:~/docker-srv/n8n# docker version
Client:
 Version:           20.10.24+dfsg1
 API version:       1.41
 Go version:        go1.19.8
 Git commit:        297e128
 Built:             Fri Jun  6 14:40:45 2025
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.24+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.8
  Git commit:       5d6db84
  Built:            Fri Jun  6 14:40:45 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.20~ds1
  GitCommit:        1.6.20~ds1-1+deb12u2
 runc:
  Version:          1.1.5+ds1
  GitCommit:        1.1.5+ds1-1+deb12u1
 docker-init:
  Version:          0.19.0
  GitCommit:        

Does anyone know what this problem is?

This issue has never occurred before. My current n8n version is 2.2.4. Now all versions higher than 2.2.4 are unavailable, i have tried v2.2.6 v2.3.2

Hi @github0null,

What happens if you upgrade Docker to the latest version?

ok. It works when i updated docker to 29.1.4

A strange problem.

I am currently stuck on docker 20 (due to inability to update the OS on my NAS).

I would really need n8n to run on this and it seems only the extraction process is failing. Any fix available for this? Or maybe a manual download and installation method?

-EDIT-

I was able to circumvent the issue by downloading the image separately with skopeoand then manually docker load.

Here is the script I am using to download the newest n8n image and (optionally) update the n8n service container. If no –update flag is given, you can just docker compose up and docker will find the latest image downloaded.

#!/bin/sh
set -eu

BASE_DIR=“$(cd “$(dirname “$0”)” && pwd)”

SKOPEO=“${BASE_DIR}/skopeo-app/skopeo-linux-amd64”
POLICY_JSON=“${BASE_DIR}/skopeo-app/containers-policy.json” #look at skopeo documentation
IMAGE=“docker.n8n.io/n8nio/n8n:latest”
ARCHIVE_DIR=“${BASE_DIR}/docker-images”
COMPOSE_DIR=“${BASE_DIR}/docker/n8n-app”
SERVICE_NAME=“n8n”
KEEP_TAR=0

TAR_PATH=“${ARCHIVE_DIR}/n8n_latest.tar”

usage() {
echo “Usage: $0 [–update] [–keep-tar]” >&2
exit 2
}

DO_UPDATE=0

for arg in “$@”; do
case “$arg” in
–update) DO_UPDATE=1 ;;
–keep-tar) KEEP_TAR=1 ;;
-h|–help) usage ;;
*) echo “Unknown arg: $arg” >&2; usage ;;
esac
done

cleanup() {
if [ “${KEEP_TAR}” -ne 1 ] && [ -f “$TAR_PATH” ]; then
rm -f – “$TAR_PATH”
fi
}
trap cleanup EXIT

if [ ! -x “$SKOPEO” ]; then
echo “ERROR: skopeo not found or not executable: $SKOPEO” >&2
exit 1
fi

if [ ! -f “$POLICY_JSON” ]; then
echo “ERROR: policy.json not found: $POLICY_JSON” >&2
exit 1
fi

mkdir -p “$ARCHIVE_DIR”

echo “→ Download n8n:latest with skopeo”
“$SKOPEO” --policy “$POLICY_JSON” copy
“docker://${IMAGE}”
“docker-archive:${TAR_PATH}:${IMAGE}”

echo “→ docker load”
docker load < “$TAR_PATH” >/dev/null

echo “✓ Image loaded in Docker: ${IMAGE}”
echo " Now you can update or create your containers from docker."

if [ “$DO_UPDATE” -eq 1 ]; then
echo “→ --update: recreate ‘${SERVICE_NAME}’ via compose”

if [ ! -d “$COMPOSE_DIR” ]; then
echo “ERROR: COMPOSE_DIR not existing: $COMPOSE_DIR” >&2
exit 1
fi

if docker compose version >/dev/null 2>&1; then
DC=“docker compose”
elif command -v docker-compose >/dev/null 2>&1; then
DC=“docker-compose”
else
echo “ERROR: docker compose not found (‘docker compose’ or ‘docker-compose’).” >&2
exit 1
fi

cd “$COMPOSE_DIR”

if $DC up --help 2>/dev/null | grep -q – ‘–pull’; then
$DC up -d --no-deps --force-recreate --pull never “$SERVICE_NAME”
else
$DC up -d --no-deps --force-recreate “$SERVICE_NAME”
fi

echo “✓ Container updated”
fi