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

Merge pull request #266 from overleaf/jpa-docker-deprecation

bin/doctor: Add deprecation warning for Docker older than v23
This commit is contained in:
Jakob Ackermann 2024-06-24 10:00:41 +02:00 committed by GitHub
commit 6779ed13c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -8,6 +8,8 @@
Support for docker-compose v1 in the Overleaf Toolkit will be dropped with the release of Server Pro 5.2.
We recommend upgrading to Docker Compose v2 before then.
- Added warning for usage of End Of Life Docker versions before v23
## 2024-06-20
### Added
- Updated default [`version`](https://github.com/overleaf/toolkit/blob/master/lib/config-seed/version) to `5.0.6`.

View file

@ -142,6 +142,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