File tree Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,24 @@ tasks:
23
23
cmds :
24
24
- |
25
25
docker network create \
26
- --driver bridge \
27
- app-tier
26
+ --driver bridge \
27
+ app-tier
28
+ status :
29
+ - |
30
+ docker network ls --format \{\{.Name\}\} \
31
+ | grep -q '^app-tier$'
28
32
29
33
vol :
30
34
desc : " Create docker volume"
31
35
cmds :
32
36
- |
33
37
docker volume create \
34
- --driver local \
35
- {{.SERVICE}}-vol
38
+ --driver local \
39
+ {{.SERVICE}}-vol
40
+ status :
41
+ - |
42
+ docker volume ls --format \{\{.Name\}\} \
43
+ | grep -q '^{{.SERVICE}}-vol$'
36
44
37
45
build :
38
46
desc : " Build the docker image"
@@ -45,11 +53,11 @@ tasks:
45
53
task docker:build
46
54
cmds :
47
55
- |
48
- if [[ -z "{{.CLI_ARGS}}" ]]; then
49
- {{.BUILD}} {{.DOCKERFILE}} {{.SERVICE}}
50
- else
51
- {{.BUILD}} {{.CLI_ARGS }} {{.DOCKERFILE}} {{.SERVICE}}
52
- fi
56
+ docker build \
57
+ -f {{.DOCKERFILE}} \
58
+ -t {{.SERVICE}} \
59
+ --platform {{.ARCH }} \
60
+ .
53
61
54
62
login :
55
63
desc : " Login to the container registry"
60
68
--password-stdin {{.REGISTRY_URL}}
61
69
run : once
62
70
silent : true
71
+ status :
72
+ - |
73
+ jq -e '.auths | keys[] | select(contains("{{.REGISTRY_URL}}"))' ~/.docker/config.json
63
74
64
75
push :
65
76
desc : " Push the docker image to the registry"
You can’t perform that action at this time.
0 commit comments