dockerize 0.1.2 → 0.1.3
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/version.rb +1 -1
- data/templates/makefile_docker.erb +20 -39
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGZlODg5N2M4YzJiNTdkNjNiY2FhYmFlMDhkYjYwMjRlMDY3YmM4ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTE2NmY5OTQwMGI3ZTAxNDY5ZDE1ZGMxY2FhMjM3ZmQ1MzU1NTZjYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjE5MmMzNzdiMWZkZTI1MDdlZDgxODVjZmE2OTA5ZGU1NTBlYTNkY2NhOGM3
|
10
|
+
NTFjMjNjODRiNGRjOTcwZTRjMDZjODIwNTg4NThhNjJkYzlmZWFiMjdmYjRk
|
11
|
+
MDg1ZWE1MzA3NGFmNDliNzVjZDFlMzg4YWRjMjczNGQ3MjRhOGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGZhY2Q1MjY1Y2I2MWE2ZmYyNjQzNzQ4Yjk0YjA5YmE5NzgxMjM0NTg5MjRj
|
14
|
+
NTU3MGI1MTdlNzYxMmI1ZmYzZWUzYzc0YzRmZTlhY2Y5MzQ4MDBmNmVlMzNj
|
15
|
+
OGFkYTJlNDRiMjZkYTAyZjlkYWVmY2U4MWM0NGRlZDJkZTk3YWE=
|
data/lib/dockerize/version.rb
CHANGED
@@ -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 '
|
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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
25
|
+
build: container tag
|
35
26
|
|
36
|
-
|
27
|
+
container:
|
28
|
+
$(DOCKER) build -t $(REGISTRY)/$(PROJECT):$(REV) $(BUILD_FLAGS) .
|
37
29
|
|
38
|
-
|
39
|
-
|
30
|
+
tag:
|
31
|
+
( test -z "$(LATEST)" && echo 'Nothing to tag!' ) || $(DOCKER) tag $(LATEST) $(REGISTRY)/$(PROJECT):latest
|
40
32
|
|
41
33
|
clean:
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
40
|
+
$(DOCKER) pull $(REGISTRY)/$(PROJECT) || true
|
60
41
|
|
61
|
-
|
62
|
-
|
42
|
+
push:
|
43
|
+
$(DOCKER) push $(REGISTRY)/$(PROJECT) || true
|
63
44
|
|
64
|
-
.PHONY: container
|
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.
|
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-
|
11
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|