From bbe5618b68c2fadeadca44fd0caaed95a51997f4 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 5 Jun 2020 11:58:25 -0700 Subject: [PATCH] Tighten Docker package regexp Previously 19.0.3.1 would match multiple versions: ``` 5:19.03.11~3-0~debian-stretch 5:19.03.10~3-0~debian-stretch 5:19.03.1~3-0~debian-stretch ``` We can tighten up the regexp by adding a `~` to the end of the version. --- scripts/install-docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-docker b/scripts/install-docker index bba1a84..4f3cf11 100755 --- a/scripts/install-docker +++ b/scripts/install-docker @@ -19,7 +19,7 @@ curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - echo "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" >> /etc/apt/sources.list.d/docker.list apt-get update -PACKAGE_VERSION=$(apt-cache policy docker-ce | awk -v dv=${DOCKER_VERSION} '$1 ~ dv {print $1}') +PACKAGE_VERSION=$(apt-cache policy docker-ce | awk -v dv=${DOCKER_VERSION}~ '$1 ~ dv {print $1}') apt-get install -y docker-ce=${PACKAGE_VERSION} docker-ce-cli=${PACKAGE_VERSION} apt-get -yq autoremove