Merge branch 'sh-fix-docker-regexp' into 'master'

Tighten Docker package regexp

See merge request gitlab-org/gitlab-build-images!301
This commit is contained in:
Stan Hu 2020-06-05 19:14:42 +00:00
commit 51378702f8

View file

@ -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