dockerize 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmQ0ZTAxMzJlNWRlMDRiNzhjMTdlYzJlYTVmNzk0MTJiMDQ3YjY3Zg==
4
+ ZGZlODg5N2M4YzJiNTdkNjNiY2FhYmFlMDhkYjYwMjRlMDY3YmM4ZQ==
5
5
  data.tar.gz: !binary |-
6
- M2Y2MGY0MWRjNjFhMTBhODIwODhiYjI4Nzc3ZmMxNWFkNWYzZDg2Ng==
6
+ ZTE2NmY5OTQwMGI3ZTAxNDY5ZDE1ZGMxY2FhMjM3ZmQ1MzU1NTZjYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2IzNzQwZTk2ODE0NWQ1Y2NmNmJkMWVlMzAyNTAzNjkxM2Y1MWMzNGRlYTU2
10
- NjM1OWNlZTE0ZDY1MDAzMDgwYTg0NTY5ZDY0YzhmZjU1MTI5OTAzNjNjMmQz
11
- NzA4ZTBhMGRjZGYyNmE3MTFiZTcwNTkwYzg1N2Q1NzAwYmU3OWE=
9
+ YjE5MmMzNzdiMWZkZTI1MDdlZDgxODVjZmE2OTA5ZGU1NTBlYTNkY2NhOGM3
10
+ NTFjMjNjODRiNGRjOTcwZTRjMDZjODIwNTg4NThhNjJkYzlmZWFiMjdmYjRk
11
+ MDg1ZWE1MzA3NGFmNDliNzVjZDFlMzg4YWRjMjczNGQ3MjRhOGI=
12
12
  data.tar.gz: !binary |-
13
- OTI4NTVhMDAyNTFjYWE5YWY3OGQzOWE3YTZlOGU3Mjk5MDI1YmU1NDQyMzVj
14
- NGM0YjhkYzgwMmM5Yzg2ZGNmOWMwYzc1MzAwNzZmZGI2OTg1N2I3YzJlZGVh
15
- MTZmMmUxNzE4ZjQ2MWE3ZTllZjE2ODYwZGVkYzlmMTI3OTEzMjQ=
13
+ OGZhY2Q1MjY1Y2I2MWE2ZmYyNjQzNzQ4Yjk0YjA5YmE5NzgxMjM0NTg5MjRj
14
+ NTU3MGI1MTdlNzYxMmI1ZmYzZWUzYzc0YzRmZTlhY2Y5MzQ4MDBmNmVlMzNj
15
+ OGFkYTJlNDRiMjZkYTAyZjlkYWVmY2U4MWM0NGRlZDJkZTk3YWE=
@@ -2,6 +2,6 @@
2
2
 
3
3
  unless defined?(Dockerize::VERSION)
4
4
  module Dockerize
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
@@ -5,7 +5,7 @@ REV ?= $(shell git describe --always)
5
5
  BUILD_FLAGS ?= -no-cache=true -rm=true
6
6
  PROJECT ?= $(shell basename $(PWD))
7
7
  REGISTRY ?= <%= registry %>
8
- LATEST ?= $(shell $(DOCKER) images | grep -v REPOSITORY | head -n 1 | grep -E '<none>|$(REGISTRY)\/$(PROJECT)' | awk '{print $$3}')
8
+ LATEST ?= $(shell $(DOCKER) images | grep -v REPOSITORY | head -n 1 | grep -E '$(REGISTRY)\/$(PROJECT)' | awk '{print $$3}')
9
9
 
10
10
  export DOCKER
11
11
  export REV
@@ -14,51 +14,32 @@ export PROJECT
14
14
  export REGISTRY
15
15
  export LATEST
16
16
 
17
- # This is a general Makefile, designed to be present at the top level of your
18
- # project for general docker development. Be sure to use `docker login` on the
19
- # vagrant vm before trying to push or pull any containers.
20
-
21
17
  all:
22
- @echo "Available targets:"
23
- @echo " * clean - remove all local images (and tags) for $(PROJECT)"
24
- @echo " * container - build a Docker container for $(PROJECT)"
25
- @echo " * latest - builds and tags the latest container for $(PROJECT) as 'latest'"
26
- @echo " * pull - pull down previous docker builds of $(REGISTRY)/$(PROJECT)"
27
- @echo " * push - push $(REGISTRY)/$(PROJECT)"
28
- @echo " * tag - tags the lastest image as 'latest'"
29
-
30
- container: .latest_container Dockerfile
31
-
32
- latest: build_and_tag
18
+ @echo "Available targets:"
19
+ @echo " * clean - remove all local images (and tags) for $(PROJECT)"
20
+ @echo " * build - build and tag the latest a Docker container for $(PROJECT)"
21
+ @echo " * pull - pull down previous docker builds of $(REGISTRY)/$(PROJECT)"
22
+ @echo " * push - push $(REGISTRY)/$(PROJECT)"
23
+ @echo " * tag - tags the lastest image as 'latest' (run as part of build as well)"
33
24
 
34
- tag: delete_current_tag .latest_tagged
25
+ build: container tag
35
26
 
36
- push: .latest_pushed
27
+ container:
28
+ $(DOCKER) build -t $(REGISTRY)/$(PROJECT):$(REV) $(BUILD_FLAGS) .
37
29
 
38
- delete_current_tag:
39
- rm -f .latest_tagged
30
+ tag:
31
+ ( test -z "$(LATEST)" && echo 'Nothing to tag!' ) || $(DOCKER) tag $(LATEST) $(REGISTRY)/$(PROJECT):latest
40
32
 
41
33
  clean:
42
- rm -f .latest_container .latest_tagged .latest_pushed .container_output
43
- export IMAGES="$(shell $(DOCKER) images | grep -E '<none>|$(REGISTRY)/$(PROJECTS)')" ; \
44
- test -z "$$IMAGES" || echo "$$IMAGES" | awk '{ print $$3 }' | \
45
- sort | uniq | xargs $(DOCKER) rmi
46
-
47
- .latest_container: pull
48
- rm -f $@
49
- $(DOCKER) rm $(shell docker ps -a -q)
50
- $(DOCKER) build -t $(REGISTRY)/$(PROJECT):$(REV) $(BUILD_FLAGS) . | tee .container_output
51
- awk '/^Successfully built/ { print $$NF }' .container_output | tail -1 > $@
52
-
53
- .latest_tagged:
54
- ( test -z "$(LATEST)" && echo 'Nothing to tag!' ) || $(DOCKER) tag $(LATEST) $(REGISTRY)/$(PROJECT):latest && touch $@
55
-
56
- build_and_tag: .latest_container tag
34
+ $(DOCKER) rm $(shell docker ps -a -q)
35
+ export IMAGES="$(shell $(DOCKER) images | grep -E '<none>')" ; \
36
+ test -z "$$IMAGES" || echo "$$IMAGES" | awk '{ print $$3 }' | \
37
+ sort | uniq | xargs $(DOCKER) rmi
57
38
 
58
39
  pull:
59
- $(DOCKER) pull $(REGISTRY)/$(PROJECT) || true
40
+ $(DOCKER) pull $(REGISTRY)/$(PROJECT) || true
60
41
 
61
- .latest_pushed: .latest_tagged
62
- $(DOCKER) push $(REGISTRY)/$(PROJECT)
42
+ push:
43
+ $(DOCKER) push $(REGISTRY)/$(PROJECT) || true
63
44
 
64
- .PHONY: container latest push clean build_and_tag tag delete_current_tag pull
45
+ .PHONY: build container tag clean pull push all
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.2
4
+ version: 0.1.3
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-21 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake