sle2docker 0.2.3 → 0.2.4

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: ba695a590e56095cca42897195533744bdc29bf3
4
- data.tar.gz: 0a00b46f07ffc4dcdf85dd4c2dbed07ed8e9f1f2
3
+ metadata.gz: 3f15d09b5ede994585073034cba25c4c68c271aa
4
+ data.tar.gz: 7a7d3c1fcdae3a14470dc0338b7d108733ea31c0
5
5
  SHA512:
6
- metadata.gz: 731ddcbf5d026a5e1b0c6a79147efcb6dd1004162806e334961304b75ae32bdc0b04ce81d8af8d04d6dd946ad17db5018ec73dcce7cca522f910d6aff8ef5d10
7
- data.tar.gz: 4a3f8c444c6410c00f93ab89a4ba3cf5e47b678e8f2d6850d9914bc3df674e3cde3947f68ab11b166cca45354c4fc22e8e407cdadd47707f968541c949da5871
6
+ metadata.gz: b5fd6e752a653025541797f876a0cf9e807998fa52c78704cfd9373801717c16f0f58074b2e2e6026035716bc72df3205b643c9e19767a4d5751fd2be97281ec
7
+ data.tar.gz: 0ce0c1b71744653b85cb1f483493820d7da2e843c51e8e8a719661bd6642514393ec7792a86d78528143485f5d1bfaa17004bea1000921fcb3e73370daeb6a56
data/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ Mon Dec 01 17:38:53 CET 2014 Flavio Castelli <fcastelli@suse.com>
2
+
3
+ * Version 0.2.4:
4
+ - Make possible to include the build time repositories into the final
5
+ image.
6
+
1
7
  Wed Nov 12 15:46:38 CET 2014 Flavio Castelli <flavio@castelli.name>
2
8
 
3
9
  * Version 0.2.3:
data/README.md CHANGED
@@ -21,7 +21,7 @@ have the rights to interact with it.
21
21
  The recommended way to install sle2docker is via zypper:
22
22
 
23
23
  ```
24
- sudo zypper in rubygem-sle2docker
24
+ sudo zypper in sle2docker
25
25
  ```
26
26
 
27
27
  However sle2docker can be installed via gem:
@@ -65,7 +65,7 @@ To build a template just use the following command:
65
65
  sle2docker build TEMPLATE
66
66
  ```
67
67
 
68
- A list of the available templates can be obtained by running:
68
+ A list of the available templates may be obtained by running:
69
69
 
70
70
  ```
71
71
  sle2docker list
@@ -92,11 +92,11 @@ sle2docker build -u USERNAME -p PASSWORD TEMPLATE_NAME
92
92
 
93
93
  ## Subscription Management Tool integration
94
94
 
95
- It is possible to download all the reuiqred packages from a local
95
+ It is possible to download all the required packages from a local
96
96
  Subscription Management Tool (SMT) instance:
97
97
 
98
98
  ```
99
- sle2docker build -s SMT_SERVER_HOSTNAME TEMPLATE
99
+ sle2docker build -s SMT_SERVER_HOSTNAME/repo TEMPLATE
100
100
  ```
101
101
 
102
102
  By default sle2docker assumes the contents of the SMT server are served over
@@ -104,7 +104,14 @@ HTTPS. To force the retrieval of the package over plain HTTP use the
104
104
  following command:
105
105
 
106
106
  ```
107
- sle2docker build -s SMT_SERVER_HOSTNAME --disable-https TEMPLATE
107
+ sle2docker build -s SMT_SERVER_HOSTNAME/repo --disable-https TEMPLATE
108
+ ```
109
+
110
+ Example: Say the FQDN of your SMT is mysmt.company.com and you want to build a SLE12 Docker image.
111
+ The corresponding call to sle2docker would look like this:
112
+
113
+ ```
114
+ sle2docker build -s mysmt.company.com/repo --disable-https SLE12
108
115
  ```
109
116
 
110
117
  By default sle2docker expects the SMT instance to not require any form of
@@ -103,6 +103,8 @@ module Sle2Docker
103
103
 
104
104
  enable_https = !@options[:disable_https]
105
105
 
106
+ include_build_repos = @options[:include_build_repositories]
107
+
106
108
  ERB.new(File.read(template_file)).result(binding)
107
109
  end
108
110
 
@@ -40,6 +40,10 @@ module Sle2Docker
40
40
  :type => :boolean,
41
41
  :default => false,
42
42
  :desc => "Do not use HTTPS when accessing repositories"
43
+ method_option :include_build_repositories, :aliases => ["--include-build-repos"],
44
+ :type => :boolean,
45
+ :default => true,
46
+ :desc => "Add the repositories used at build time to the Docker image"
43
47
  def show(template_name)
44
48
  template_dir = Template.template_dir(template_name)
45
49
  builder = Builder.new(options)
@@ -76,6 +80,10 @@ module Sle2Docker
76
80
  method_option :http_proxy, :aliases => ["--http-proxy"],
77
81
  :default => ENV['http_proxy'],
78
82
  :desc => "HTTP proxy to use (eg: http://squid.local:3128)"
83
+ method_option :include_build_repositories, :aliases => ["--include-build-repos"],
84
+ :type => :boolean,
85
+ :default => true,
86
+ :desc => "Add the repositories used at build time to the Docker image"
79
87
  def build(template_name)
80
88
  template_dir = Template.template_dir(template_name)
81
89
  builder = Builder.new(options)
@@ -1,5 +1,5 @@
1
1
  module Sle2Docker
2
2
 
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
 
5
5
  end
@@ -25,16 +25,16 @@
25
25
  <users group="root">
26
26
  <user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/>
27
27
  </users>
28
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP2:Updates" <%= credentials %>>
28
+ <repository type="rpm-md" alias="SLES11:SP2:Updates" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
29
29
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP2-Updates/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
30
30
  </repository>
31
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP2:Core" <%= credentials %>>
31
+ <repository type="rpm-md" alias="SLES11:SP2:Core" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
32
32
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP2-Core/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
33
33
  </repository>
34
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP1:Updates" <%= credentials %>>
34
+ <repository type="rpm-md" alias="SLES11:SP1:Updates" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
35
35
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP1-Updates/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
36
36
  </repository>
37
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP1:Pool" <%= credentials %>>
37
+ <repository type="rpm-md" alias="SLES11:SP1:Pool" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
38
38
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP1-Pool/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
39
39
  </repository>
40
40
  <packages type="image">
@@ -25,10 +25,10 @@
25
25
  <users group="root">
26
26
  <user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/>
27
27
  </users>
28
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP3:Updates" <%= credentials %>>
28
+ <repository type="rpm-md" alias="SLES11:SP3:Updates" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
29
29
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
30
30
  </repository>
31
- <repository type="rpm-md" imageinclude="true" alias="SLES11:SP3:Pool" <%= credentials %>>
31
+ <repository type="rpm-md" alias="SLES11:SP3:Pool" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
32
32
  <source path="http<%= "s" if enable_https %>://<%= host %>/repo/$RCE/SLES11-SP3-Pool/sle-11-x86_64<%= "?credentials=NCCcredentials" if use_ncc %>"/>
33
33
  </repository>
34
34
  <packages type="image">
@@ -25,10 +25,10 @@
25
25
  <users group="root">
26
26
  <user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/>
27
27
  </users>
28
- <repository type="rpm-md" alias="SLE12:Pool" >
28
+ <repository type="rpm-md" alias="SLE12:Pool" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
29
29
  <source path="http<%= "s" if enable_https %>://<%= host %>/SUSE/Products/SLE-SERVER/12/x86_64/product<%= "?credentials=NCCcredentials" if use_ncc %>"/>
30
30
  </repository>
31
- <repository type="rpm-md" alias="SLE12:Updates" >
31
+ <repository type="rpm-md" alias="SLE12:Updates" <%= 'imageinclude="true"' if include_build_repos %> <%= credentials %>>
32
32
  <source path="http<%= "s" if enable_https %>://<%= host %>/SUSE/Updates/SLE-SERVER/12/x86_64/update<%= "?credentials=NCCcredentials" if use_ncc %>"/>
33
33
  </repository>
34
34
  <packages type="image">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sle2docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flavio Castelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-12 00:00:00.000000000 Z
11
+ date: 2014-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor