I am using Linux (Ubuntu 22.04) and wanted to run gitlab-runner with the following YAMK file locally:
image: ubuntu:latest
test:
script:
- echo "Hello Gitlab-Runner"
When I execute gitlab-runner exec docker test, I get the following error:
Running with gitlab-runner 11.2.0 (11.2.0)
Using Docker executor with image ubuntu:latest ...
ERROR: Preparation failed: Error response from daemon: {"message":"client version 1.18 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version"} (executor_docker.go:1147:0s)
Will be retried in 3s ...
I checked the docker version I have:
Client: Docker Engine - Community
Version: 26.0.0
API version: 1.45
Go version: go1.21.8
Git commit: 2ae903e
Built: Wed Mar 20 15:17:51 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.0.0
API version: 1.45 (minimum version 1.24)
Go version: go1.21.8
Git commit: 8b79278
Built: Wed Mar 20 15:17:51 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Any ideas?
I have upgraded the gitlab-runner version to the latest one, and could resolve the issue. However, it is not clear why the problem occurred with the lower gitlab-runner version.