-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-dist
executable file
·65 lines (54 loc) · 1.5 KB
/
docker-dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh -e
base=`dirname $0`
if [ -z "$dists" ]; then
dists="debian/jessie debian/stretch debian/sid \
ubuntu/precise ubuntu/trusty ubuntu/vivid ubuntu/wily ubuntu/xenial \
centos/5 centos/6 centos/7"
fi
if [ -z "$archs" ]; then
archs="i386 amd64"
fi
if [ -z "$KEY_ID" ]; then
KEY_ID="4F23A0260F19DAC5"
fi
if [ -z "$2" ]; then
case "$1" in
create )
for dist in $dists; do
if [ ! -f "$base/docker/$dist/Dockerfile" ]; then
echo "Unknown dist $dist"
exit 1
fi
(
echo "== building $dist"
cd "$base/docker/$dist"
docker build -t "$dist:build" .
)
done
exit 0
;;
esac
fi
for file in $@; do
case "$file" in
*_source.changes )
;;
* )
echo "Unknown file $file"
exit 1
;;
esac
done
echo "OK"
##!/bin/sh
# rpath=`pwd`
# dchroot -c i386 "cd $rpath && linux32 dpkg-buildpackage -ai386 $@"
# Save it under /usr/local/bin/ia32-dpkg-buildpackage, make it executable and change the chroot name
# according to your environment.
# You will need to have your home directory available under the chroot.
# Now you can build i386 packages using ia32-dpkg-buildpackage like dpkg-buildpackage. for example:
# $ ia32-dpkg-buildpackage -rfakeroot
# RPM
# rpmdev-setuptree
# yum-builddep -y spec
# rpmbuild -ba spec