docker-template 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/template/version.rb +1 -1
- data/templates/rootfs/alpine.erb +1 -1
- data/templates/rootfs/ubuntu.erb +31 -33
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e598d8ac190602aa8f10f7fcb75e6de30e28f0
|
4
|
+
data.tar.gz: 07f80e7e207f57f87cd189a424167a47bbc1779f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0479a7b685bde364749bf5ec448dcc54e3ef3ca73c05dc13b50b5e8d1dd14ce26a425190c3b948c85de5c55f778ceb5ee9e680b7bec5909e73c943459bedf229
|
7
|
+
data.tar.gz: 4dde50801034387b9071eaa670dd9e5e52f4744599cabe6d2616c786f6b3176033ffdd6fd87d884006202b3c38c7d4b870115ef27567cdcd34bb6434bf92e9fd
|
data/templates/rootfs/alpine.erb
CHANGED
@@ -8,7 +8,7 @@ TMPDIR=$(mktemp -d)
|
|
8
8
|
MIRROR_HOST="<%= @meta.mirror_host %>"
|
9
9
|
[ "$MIRROR_HOST" ] || MIRROR_HOST="mirror.envygeeks.io"
|
10
10
|
MIRRORS="\nhttp://$MIRROR_HOST/alpine/<%= @meta.release =~ /^[\d,\.]+$/ ? "v" : "" %><%= @meta.release %>/main"
|
11
|
-
MIRRORS=$MIRRORS"\n@community http://$MIRROR_HOST/alpine
|
11
|
+
MIRRORS=$MIRRORS"\n@community http://$MIRROR_HOST/alpine/<%= @meta.release =~ /^[\d,\.]+$/ ? "v" : "" %>/community"
|
12
12
|
MIRRORS=$MIRRORS"\n@testing http://$MIRROR_HOST/alpine/edge/testing"
|
13
13
|
RELEASE_URL="http://$MIRROR_HOST/alpine/<%= @meta.release \
|
14
14
|
=~ /^[\d,\.]+$/ ? "v" : "" %><%= @meta.release %>/main"
|
data/templates/rootfs/ubuntu.erb
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
set -e
|
4
4
|
|
5
5
|
ROOTFS=$(mktemp -d)
|
6
|
-
|
6
|
+
MIRROR_HOST="<%= @meta.mirror_host %>"
|
7
|
+
[ "$MIRROR_HOST" ] || MIRROR_HOST="archive.ubuntu.com"
|
8
|
+
PARTNER_URL="https://mirror.envygeeks.io/core-ubuntu"
|
7
9
|
TMP=$(mktemp -d)
|
8
10
|
|
9
11
|
# --
|
@@ -15,8 +17,8 @@ apk --update add wget gnupg ca-certificates \
|
|
15
17
|
# --
|
16
18
|
|
17
19
|
gpg --keyserver keyserver.ubuntu.com --recv-keys 1A5D6C4C7DB87C81
|
18
|
-
wget $PARTNER_URL/<%= @meta.release %>/
|
19
|
-
wget $PARTNER_URL/<%= @meta.release %>/
|
20
|
+
wget $PARTNER_URL/<%= @meta.release %>/SHA256SUMS.gpg
|
21
|
+
wget $PARTNER_URL/<%= @meta.release %>/SHA256SUMS
|
20
22
|
gpg --verify SHA256SUMS.gpg SHA256SUMS
|
21
23
|
|
22
24
|
cat SHA256SUMS
|
@@ -24,7 +26,7 @@ sha=$(cat SHA256SUMS | grep "amd64" | awk -F' *' '{ print $1 }')
|
|
24
26
|
img=$(cat SHA256SUMS | grep "amd64" | awk -F' *' '{ print $2 }' \
|
25
27
|
| sed -r 's/^\*//')
|
26
28
|
|
27
|
-
wget --progress=bar "$PARTNER_URL/<%= @meta.release
|
29
|
+
wget --progress=bar "$PARTNER_URL/<%= @meta.release %>/$img"
|
28
30
|
if [ "$(sha256sum $img | awk '{ print $1 }')" != "$sha" ]; then
|
29
31
|
echo "Bailing, the SHA256sum did not match."
|
30
32
|
fi
|
@@ -43,26 +45,29 @@ cp /etc/hosts $ROOTFS/etc/hosts
|
|
43
45
|
|
44
46
|
# --
|
45
47
|
|
46
|
-
chroot "$ROOTFS" sh -ec "
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
ln -s /bin/true /sbin/initctl
|
51
|
-
}"
|
48
|
+
chroot "$ROOTFS" sh -ec "dpkg-divert --local --rename --add /sbin/initctl"
|
49
|
+
chroot "$ROOTFS" sh -ec "dpkg-divert --local --rename --add /usr/sbin/update-rc.d"
|
50
|
+
ln -s /bin/true $ROOTFS/usr/sbin/update-rc.d
|
51
|
+
ln -s /bin/true $ROOTFS/sbin/initctl
|
52
52
|
|
53
53
|
# --
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
55
|
+
sed -i 's/^#\s*\(deb.*universe\)$/\1/g' $ROOTFS/etc/apt/sources.list
|
56
|
+
sed -i "s/archive\.ubuntu\.com/$MIRROR_HOST/g" $ROOTFS/etc/apt/sources.list
|
57
|
+
chroot "$ROOTFS" sh -ec 'echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections'
|
58
|
+
echo 'Dpkg::Options { "--force-confdef"; "--force-confold"; }' > $ROOTFS/etc/apt/apt.conf.d/03confdef
|
59
|
+
echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > \
|
60
|
+
$ROOTFS/etc/apt/apt.conf.d/00norecommends
|
61
|
+
|
62
|
+
# --
|
63
|
+
|
64
|
+
echo "exit 101" > $ROOTFS/usr/sbin/policy-rc.d policy-rc.d
|
65
|
+
echo 'APT::Get::Assume-Yes "true";' > $ROOTFS/etc/apt/apt.conf.d/01yes
|
66
|
+
echo 'Apt::Get::Purge "true";' > $ROOTFS/etc/apt/apt.conf.d/02purge
|
67
|
+
sed -ri '/^(deb-src\s+|$|#)/d' $ROOTFS/etc/apt/sources.list
|
68
|
+
chmod uog+x $ROOTFS/usr/sbin/policy-rc.d
|
65
69
|
|
70
|
+
chroot "$ROOTFS" sh -ec "{
|
66
71
|
apt-get update
|
67
72
|
apt-get install locales deborphan <%= @meta.packages %>
|
68
73
|
echo 'Yes, do as I say!' | SUDO_FORCE_REMOVE=yes apt-get autoremove -f <%= @meta.package_cleanup %>
|
@@ -78,19 +83,12 @@ chroot "$ROOTFS" sh -ec "{
|
|
78
83
|
# --
|
79
84
|
|
80
85
|
<% if @meta.helpers? %>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
git clone https://github.com/envygeeks/docker-helper.git
|
88
|
-
cp -R docker-helper/src/* /
|
89
|
-
rm -rf /usr/src/*
|
90
|
-
|
91
|
-
apt-get autoremove --purge \
|
92
|
-
git ca-certificates -yf
|
93
|
-
}'
|
86
|
+
mkdir -p /usr/src
|
87
|
+
cd /usr/src
|
88
|
+
|
89
|
+
apk --update add ca-certificates git
|
90
|
+
git clone --verbose https://github.com/envygeeks/docker-helper.git
|
91
|
+
cp -R docker-helper/src/* $ROOTFS/
|
94
92
|
<% end %>
|
95
93
|
|
96
94
|
# --
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|