tator
tator copied to clipboard
Check docker for version if experimental flag not found
In the Makefile, there is a check to see if the experimental flag is enabled. This was added to ensure that the --platform
argument is available, but it is also available in client versions 20.10.17
and later. Improve the check to look at the version if the experimental flag is not set or is disabled. Or maybe check the version first, then check for experimental if the version is lower than 20.10.17
.
Can get the major/minor/patch versions inside the makefile like so:
DOCKER_VER_NUM=$(shell docker version --format '{{json .Client.Version}}' | grep -Eo "[0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}")
DOCKER_MAJ_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f1 -d.)
DOCKER_MIN_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f2 -d.)
DOCKER_PAT_VER=$(shell echo $(DOCKER_VER_NUM) | cut -f3 -d.)