1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 15:28:06 +02:00

bin/doctor: Add deprecation warning for Docker older than v23

This commit is contained in:
Jakob Ackermann 2024-06-21 12:36:49 +01:00
parent 74de8d6686
commit 3ea3f4f7c1
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A

View file

@ -141,6 +141,18 @@ function check_docker_daemon() {
if docker ps &>/dev/null; then
print_point 1 "status: up"
local docker_server_version=$(docker version -f '{{.Server.Version}}')
print_point 1 "server version: $docker_server_version"
if [[ "$docker_server_version" =~ ^([0-9]+)\.([0-9]+) ]]; then
local major="${BASH_REMATCH[1]}"
local minor="${BASH_REMATCH[2]}"
if [[ "$major" -lt 23 ]]; then
add_warning "Docker v$major.$minor has reached its End Of Life. We recommend upgrading to a supported version."
fi
else
add_warning "Docker server version unknown ($docker_server_version)"
fi
if docker info | grep -q -e '/var/snap/docker/common/var-lib-docker'; then
add_warning "Installing Docker via snap is not supported. The sandboxed compiles feature may not be available. Please follow the steps for installing Docker CE on https://docs.docker.com/engine/install/."
fi