mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add file to test install script
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
parent
0e3674d7d0
commit
83416f68de
3 changed files with 37 additions and 9 deletions
|
@ -2,8 +2,7 @@
|
|||
# THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"!
|
||||
#
|
||||
|
||||
FROM debian:wheezy
|
||||
RUN echo deb http://http.debian.net/debian wheezy-backports main > /etc/apt/sources.list.d/wheezy-backports.list
|
||||
FROM debian:wheezy-backports
|
||||
|
||||
RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
|
@ -22,6 +22,13 @@ for version in "${versions[@]}"; do
|
|||
suite="${version##*-}"
|
||||
from="${distro}:${suite}"
|
||||
|
||||
case "$from" in
|
||||
debian:wheezy)
|
||||
# add -backports, like our users have to
|
||||
from+='-backports'
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "$version"
|
||||
echo "$version -> FROM $from"
|
||||
cat > "$version/Dockerfile" <<-EOF
|
||||
|
@ -32,13 +39,6 @@ for version in "${versions[@]}"; do
|
|||
FROM $from
|
||||
EOF
|
||||
|
||||
case "$from" in
|
||||
debian:wheezy)
|
||||
# add -backports, like our users have to
|
||||
echo "RUN echo deb http://http.debian.net/debian $suite-backports main > /etc/apt/sources.list.d/$suite-backports.list" >> "$version/Dockerfile"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo >> "$version/Dockerfile"
|
||||
|
||||
extraBuildTags=
|
||||
|
|
29
hack/make/test-install-script
Executable file
29
hack/make/test-install-script
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
# This script is used for testing install.sh and that it works for
|
||||
# each of component of our apt and yum repos
|
||||
set -e
|
||||
|
||||
test_install_script(){
|
||||
# these are equivalent to main, testing, experimental components
|
||||
# in the repos, but its the url that will do the conversion
|
||||
components=( experimental test get )
|
||||
|
||||
for component in "${components[@]}"; do
|
||||
# change url to specific component for testing
|
||||
local test_url=https://${component}.docker.com
|
||||
local script=$(mktemp /tmp/install-XXXXXXXXXX.sh)
|
||||
sed "s,url='https://get.docker.com/',url='${test_url}/'," hack/install.sh > "${script}"
|
||||
|
||||
chmod +x "${script}"
|
||||
|
||||
# test for each Dockerfile in contrib/builder
|
||||
for dir in contrib/builder/*/*/; do
|
||||
local from="$(awk 'toupper($1) == "FROM" { print $2; exit }' "$dir/Dockerfile")"
|
||||
|
||||
echo "running install.sh for ${component} with ${from}"
|
||||
docker run --rm -it -v ${script}:/install.sh ${from} /install.sh
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
test_install_script
|
Loading…
Reference in a new issue