dock0 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/Rakefile +1 -5
- data/dock0.gemspec +1 -3
- data/lib/dock0.rb +1 -0
- metadata +3 -35
- data/spec/dock0_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86db9bf623fa4fbb36f27052e0840772fa84a5dd
|
4
|
+
data.tar.gz: d018c8f6b981ac4f65951c7071ae4d041f6b309a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e53cdc249cb4ad2d804ba87035f3099e3b99befaf5af20ccc7816171dfb2517dee844652e5f16d02d065eec3903ecd666dd9083950c7b814e3a198b50cb10b76
|
7
|
+
data.tar.gz: 8de5fd31242d696a9d577a20225c6e7f6cad1358632c47fa42518496020421cf65d9a8162622fded233c50e146b56fcc331b2c5b7ed7aafb4c9efe02838ae35d
|
data/README.md
CHANGED
@@ -4,14 +4,28 @@ dock0
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/dock0.png)](http://badge.fury.io/rb/dock0)
|
5
5
|
[![Dependency Status](https://gemnasium.com/akerl/dock0.png)](https://gemnasium.com/akerl/dock0)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/akerl/dock0.png)](https://codeclimate.com/github/akerl/dock0)
|
7
|
-
[![Coverage Status](https://coveralls.io/repos/akerl/dock0/badge.png?branch=master)](https://coveralls.io/r/akerl/dock0?branch=master)
|
8
|
-
[![Build Status](https://travis-ci.org/akerl/dock0.png?branch=master)](https://travis-ci.org/akerl/dock0)
|
9
7
|
|
10
8
|
Dynamic Arch image generator for building a read-only host system for [Docker](https://www.docker.io)
|
11
9
|
|
12
10
|
## Usage
|
13
11
|
|
14
|
-
|
12
|
+
This is basically a meta-script that builds Arch images. Its primary use is to build read-only Docker hosts for me, but it could realistically be repurposed for other kinds of minimal deployments.
|
13
|
+
|
14
|
+
An example configuration can be found in [this repo](https://www.github.com/akerl/my_dock0).
|
15
|
+
|
16
|
+
The dock0 command accepts a list of configuration files as arguments. It changes to the directory of the first file given, so all other files and configuration options can use relative pathing based from that location:
|
17
|
+
|
18
|
+
dock0 /opt/my_dock0/config.yaml ./configs/foobar.yaml
|
19
|
+
|
20
|
+
The module's Dock0::Image class exposes various methods, but the recommended option is to run .easy_mode(), which runs through them all in the preferred order. This is the sequence (@config represents the merged configs provided):
|
21
|
+
|
22
|
+
1. `.prepare_device()` makes an ext2 filesystem at `@config['paths']['device']` and mounts it at `@config['paths']['mount']`
|
23
|
+
2. `.prepare_root()` creates a filesystem at `@config['paths']['build_file']` and mounts it at `@config['paths']['build']`
|
24
|
+
3. `.install_packages()` pacstraps the root filesystem with all the packages listed in `@config['paths']['package_list']`
|
25
|
+
4. `.apply_overlay()` copies the contents of `@config['paths']['overlay']` into the root filesystem
|
26
|
+
5. `.run_scripts()` runs all the ruby scripts in `@config['paths']['scripts']` in its own scope (the have access to `@config` and such)
|
27
|
+
6. `.run_commands()` runs all commands in `@config['commands']['chroot']` using arch-chroot and all commands in `@config['commands']['host']` on the host system
|
28
|
+
7. `.finalize()` unmounts the root FS, packs it in a squashfs, puts it on the target device, and unmounts that
|
15
29
|
|
16
30
|
## Installation
|
17
31
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
require 'rspec/core/rake_task'
|
3
2
|
require 'rubocop/rake_task'
|
4
3
|
|
5
4
|
desc 'Update bundle'
|
@@ -7,9 +6,6 @@ task :bundle do
|
|
7
6
|
`bundle update`
|
8
7
|
end
|
9
8
|
|
10
|
-
desc 'Run tests'
|
11
|
-
RSpec::Core::RakeTask.new(:spec)
|
12
|
-
|
13
9
|
desc 'Run Rubocop on the gem'
|
14
10
|
Rubocop::RakeTask.new(:rubocop) do |task|
|
15
11
|
task.patterns = ['lib/**/*.rb', 'spec/*.rb', 'spec/helpers/*.rb', 'bin/*']
|
@@ -21,5 +17,5 @@ task :travislint do
|
|
21
17
|
print 'There is an issue with your .travis.yml' unless system('travis-lint')
|
22
18
|
end
|
23
19
|
|
24
|
-
task default: [:
|
20
|
+
task default: [:travislint, :rubocop, :build]
|
25
21
|
task release: [:bundle]
|
data/dock0.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'dock0'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.4'
|
4
4
|
s.date = Time.now.strftime("%Y-%m-%d")
|
5
5
|
|
6
6
|
s.summary = 'Builds a read-only Arch host for Docker'
|
@@ -17,7 +17,5 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_development_dependency 'rubocop'
|
18
18
|
s.add_development_dependency 'travis-lint'
|
19
19
|
s.add_development_dependency 'rake'
|
20
|
-
s.add_development_dependency 'coveralls'
|
21
|
-
s.add_development_dependency 'rspec'
|
22
20
|
s.add_development_dependency 'fuubar'
|
23
21
|
end
|
data/lib/dock0.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dock0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -52,34 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: coveralls
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
56
|
name: fuubar
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,8 +84,6 @@ files:
|
|
112
84
|
- bin/dock0
|
113
85
|
- dock0.gemspec
|
114
86
|
- lib/dock0.rb
|
115
|
-
- spec/dock0_spec.rb
|
116
|
-
- spec/spec_helper.rb
|
117
87
|
homepage: https://github.com/aker/dock0
|
118
88
|
licenses:
|
119
89
|
- MIT
|
@@ -138,6 +108,4 @@ rubygems_version: 2.0.14
|
|
138
108
|
signing_key:
|
139
109
|
specification_version: 4
|
140
110
|
summary: Builds a read-only Arch host for Docker
|
141
|
-
test_files:
|
142
|
-
- spec/dock0_spec.rb
|
143
|
-
- spec/spec_helper.rb
|
111
|
+
test_files: []
|
data/spec/dock0_spec.rb
DELETED