dockerize 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/dockerize/config.rb +3 -3
- data/lib/dockerize/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/templates/run_example_upstart_config_conf.erb +26 -0
- data/templates/run_makefile_run.erb +13 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWMwNDVlZGNhODliMDYxZGJlNGVkZjI2N2M5NjdiMTAwY2Q1MjZjYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDQwYWNlMTNkYmRmYjZjZjI0NTY2MTYyZmM4NTdmNzM4YTNiYmZjZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWZhMzI0ZjcyZGM0MmQ4ZjI3MDc3ZDQzMjBjNjhjYzMxOTBiYjllZDkyODE0
|
10
|
+
NmIwNWZkZTc1Zjk1OGIxNDA5ZDJiZmEyYzdkM2E2NWU1YzdlY2Q0MzRmYTFi
|
11
|
+
NzliNzI4NjBmNjY2ZTQ2ZGE2YmJiYWZjYTQzNzIwMDgyZjZiYzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2NlNjFjZmY3ZGNhYzE2ZDBmZThhOWIxNDNkMDBjNTUyMDY2NmMyNTNlOTAw
|
14
|
+
NWRjNDY2YzZiMTk2OTM0NzRiZjQ4YzRhZTc3ZGM0ODM4NTA0OGI3NDRjMDY3
|
15
|
+
NjkwNjIyMjM0NmYxNTQwMmYyM2U5ZmI5MDUxODE2NjMzNWVjOGM=
|
data/lib/dockerize/config.rb
CHANGED
@@ -20,7 +20,7 @@ module Dockerize
|
|
20
20
|
template_dir: ENV['DOCKERIZE_TEMPLATE_DIR'] || "#{top}/templates",
|
21
21
|
maintainer: ENV['DOCKERIZE_MAINTAINER'] ||
|
22
22
|
"#{ENV['USER']} <#{ENV['USER']}@example.com>",
|
23
|
-
from: ENV['DOCKERIZE_FROM'] || 'ubuntu:12.04'
|
23
|
+
from: ENV['DOCKERIZE_FROM'] || 'ubuntu:12.04'
|
24
24
|
}
|
25
25
|
|
26
26
|
OptionParser.new do |opt|
|
@@ -45,7 +45,7 @@ module Dockerize
|
|
45
45
|
opt.on(
|
46
46
|
'-b',
|
47
47
|
'--[no-]backup',
|
48
|
-
'Creates .bak version of files before overwriting them'
|
48
|
+
'Creates .bak version of files before overwriting them'
|
49
49
|
) { |b| opts[:backup] = b }
|
50
50
|
|
51
51
|
# -r/--registry
|
@@ -59,7 +59,7 @@ module Dockerize
|
|
59
59
|
opt.on(
|
60
60
|
'-t TEMPLATE_DIR',
|
61
61
|
'--template-dir TEMPLATE_DIR',
|
62
|
-
'The directory containing the templates to be written'
|
62
|
+
'The directory containing the templates to be written'
|
63
63
|
) { |t| opts[:template_dir] = t }
|
64
64
|
|
65
65
|
# -m/--maintainer
|
data/lib/dockerize/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
<% self.filename = '.run/example-upstart-config.conf' -%>
|
2
|
+
<% self.executable = false -%>
|
3
|
+
|
4
|
+
description "Example app container"
|
5
|
+
author "<%= maintainer %>"
|
6
|
+
|
7
|
+
start on (filesystem or runlevel [2345]) and started docker
|
8
|
+
stop on runlevel [!2345]
|
9
|
+
|
10
|
+
umask 022
|
11
|
+
|
12
|
+
respawn
|
13
|
+
respawn limit 3 10
|
14
|
+
|
15
|
+
script
|
16
|
+
FILE=/var/run/docker.sock
|
17
|
+
|
18
|
+
# make absolutely sure docker is running
|
19
|
+
while [ ! -e $FILE ] ; do
|
20
|
+
inotifywait -t 2 -e create $(dirname $FILE)
|
21
|
+
done
|
22
|
+
|
23
|
+
docker run -sig-proxy -p 22 -p 80:80 <%= from %>
|
24
|
+
end script
|
25
|
+
|
26
|
+
# vim:filetype=upstart
|
@@ -1,5 +1,10 @@
|
|
1
1
|
<% self.filename = '.run/Makefile.run' -%>
|
2
2
|
<% self.executable = false -%>
|
3
|
+
DEBIAN_FRONTEND = noninteractive
|
4
|
+
DOCKER_REV ?= latest
|
5
|
+
export DEBIAN_FRONTEND
|
6
|
+
export DOCKER_REV
|
7
|
+
|
3
8
|
all: deploy
|
4
9
|
|
5
10
|
# The deploy task is the one that will be called automatically when this
|
@@ -8,6 +13,12 @@ all: deploy
|
|
8
13
|
# you need. This Makefile is designed to be used to place files on the host
|
9
14
|
# machine that will be used by your container or to run your container. Good
|
10
15
|
# examples include configuraiton files and Upstart conf files.
|
11
|
-
deploy:
|
16
|
+
deploy: deps conf
|
17
|
+
@apt-get install -yq inofity-tools
|
18
|
+
|
19
|
+
conf:
|
20
|
+
@sed -e "s/DOCKER_REV/$$DOCKER_REV/" example-upstart-config.conf > /etc/init/example-upstart-config.conf
|
21
|
+
|
22
|
+
.PHONY: all deploy deps conf
|
12
23
|
|
13
|
-
|
24
|
+
# vim:filetype=make
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafe Colton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01
|
11
|
+
date: 2014-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- templates/dockerfile.erb
|
134
134
|
- templates/makefile_docker.erb
|
135
135
|
- templates/run_bridge.erb
|
136
|
+
- templates/run_example_upstart_config_conf.erb
|
136
137
|
- templates/run_makefile_run.erb
|
137
138
|
- templates/vagrant_provision_sh.erb
|
138
139
|
- templates/vagrantfile.erb
|