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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ffcb35889c09b22bd18672e20c7907578b5fe2d
4
- data.tar.gz: fe154a23ec45528f19325612c305edd860586eac
3
+ metadata.gz: 51e598d8ac190602aa8f10f7fcb75e6de30e28f0
4
+ data.tar.gz: 07f80e7e207f57f87cd189a424167a47bbc1779f
5
5
  SHA512:
6
- metadata.gz: 2dddf6ae46fb045aeaec2868e86952334980d608068f3028cd00627a84cd0b03a1e5ca9ba907370f250f1d44bc8d642805cb5ede26f78ea8e2e513ff6eba3630
7
- data.tar.gz: 8393414493d0e7754c05acc1b27f6d1cae0f210ac60258ef94265dc496a2be86873f21ffa0648809f8f8f247d445ba56be7cbbcb5873f1ce6b5726674d6bd7fa
6
+ metadata.gz: 0479a7b685bde364749bf5ec448dcc54e3ef3ca73c05dc13b50b5e8d1dd14ce26a425190c3b948c85de5c55f778ceb5ee9e680b7bec5909e73c943459bedf229
7
+ data.tar.gz: 4dde50801034387b9071eaa670dd9e5e52f4744599cabe6d2616c786f6b3176033ffdd6fd87d884006202b3c38c7d4b870115ef27567cdcd34bb6434bf92e9fd
@@ -4,6 +4,6 @@
4
4
 
5
5
  module Docker
6
6
  module Template
7
- VERSION = "0.12.0"
7
+ VERSION = "0.13.0"
8
8
  end
9
9
  end
@@ -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/edge/community"
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"
@@ -3,7 +3,9 @@
3
3
  set -e
4
4
 
5
5
  ROOTFS=$(mktemp -d)
6
- PARTNER_URL="https://partner-images.canonical.com/core"
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 %>/current/SHA256SUMS.gpg
19
- wget $PARTNER_URL/<%= @meta.release %>/current/SHA256SUMS
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 %>/current/$img"
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
- dpkg-divert --local --rename --add /sbin/initctl
48
- dpkg-divert --local --rename --add /usr/sbin/update-rc.d
49
- ln -s /bin/true /usr/sbin/update-rc.d
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
- chroot "$ROOTFS" sh -ec "{
56
- sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list
57
- echo \"debconf debconf/frontend select Noninteractive\" | debconf-set-selections
58
- echo 'Dpkg::Options { \"--force-confdef\"; \"--force-confold\"; }' > /etc/apt/apt.conf.d/03confdef
59
- echo 'APT::Get::Install-Recommends \"false\"; APT::Get::Install-Suggests \"false\";' > /etc/apt/apt.conf.d/00norecommends
60
- echo 'APT::Get::Assume-Yes \"true\"; APT::Get::force-yes \"true\";' > /etc/apt/apt.conf.d/01yes
61
- echo 'Apt::Get::Purge \"true\";' > /etc/apt/apt.conf.d/02purge
62
- echo \"exit 101\" > /usr/sbin/policy-rc.d policy-rc.d
63
- sed -ri '/^(deb-src\s+|$|#)/d' /etc/apt/sources.list
64
- chmod uog+x /usr/sbin/policy-rc.d
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
- chroot $ROOTFS sh -ec '{
82
- mkdir -p /usr/src
83
- cd /usr/src
84
-
85
- apt-get update
86
- apt-get install --no-install-recommends -yf git ca-certificates
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.12.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-10 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor