1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make/test-old-apt-repo
Jessica Frazelle 3f27479435
add script to test the old apt-repo
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-04 16:01:19 -08:00

29 lines
791 B
Bash
Executable file

#!/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