Merge pull request #17697 from jfrazelle/test-old-apt-repo

add script to test the old apt-repo
This commit is contained in:
Vincent Demeester 2015-11-05 12:11:57 +01:00
commit f267e4be54

29
hack/make/test-old-apt-repo Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
set -e
versions=( 1.3.3 1.4.1 1.5.0 1.6.2 )
install() {
local version=$1
local tmpdir=$(mktemp -d /tmp/XXXXXXXXXX)
local dockerfile="${tmpdir}/Dockerfile"
cat <<-EOF > "$dockerfile"
FROM debian:jessie
ENV VERSION ${version}
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
--no-install-recommends
RUN echo "deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
RUN apt-get update && apt-get install -y \
lxc-docker-\${VERSION}
EOF
docker build --rm --force-rm --no-cache -t docker-old-repo:${version} -f $dockerfile $tmpdir
}
for v in "${versions[@]}"; do
install "$v"
done