@@ -3,7 +3,7 @@ PYTHON_PACKAGE_VERSION := $(shell python -c 'import record_api; print(record_api
3
3
4
4
$(info Python package version = ${PYTHON_PACKAGE_VERSION})
5
5
6
- IMAGE := saulshanabrook /python-record-api
6
+ IMAGE := registry.digitalocean.com /python-record-api
7
7
8
8
# The tag for base image is base-{python version}-{version-increment}
9
9
# The tag for other versions are {name}-{python version}-{base version increment}-{version increment}
@@ -12,17 +12,17 @@ IMAGE := saulshanabrook/python-record-api
12
12
version = $(shell cat images/$(1 ) /version)
13
13
14
14
15
- BASE_IMAGE := ${IMAGE}: base- ${PYTHON_PACKAGE_VERSION}-$(call version,base)
15
+ BASE_IMAGE := ${IMAGE}/ base: ${PYTHON_PACKAGE_VERSION}-$(call version,base)
16
16
17
17
$(info Base image = ${BASE_IMAGE})
18
18
19
- sub_tag = $(1 ) - ${PYTHON_PACKAGE_VERSION}-$(call version,base) -$(call version,$(1 ) )
20
- sub_image = ${IMAGE}: $(call sub_tag,$(1 ) )
19
+ sub_tag = $(1 ) : ${PYTHON_PACKAGE_VERSION}-$(call version,base) -$(call version,$(1 ) )
20
+ sub_image = ${IMAGE}/ $(call sub_tag,$(1 ) )
21
21
22
22
WORKFLOW_VERSION := $(shell cat argo/version)
23
23
$(info Workflow version = ${WORKFLOW_VERSION})
24
24
25
- workflow_name = $(call sub_tag,$(1 ) ) -${WORKFLOW_VERSION}
25
+ workflow_name = $(subst :,-, $( call sub_tag,$(1 ) ) ) -${WORKFLOW_VERSION}
26
26
27
27
IMAGES := $(sort $(filter-out base,$(notdir $(wildcard images/* ) ) ) )
28
28
@@ -107,6 +107,8 @@ test-%: docker-bake.json
107
107
# Generate docker bake file with default group
108
108
# https://github.com/docker/buildx/issues/183#issuecomment-551216260
109
109
110
+ # file parsing
111
+ # https://github.com/docker/buildx/blob/fd6de6b6aeac780c59e5079a96b068076b676d73/bake/bake.go#L333
110
112
define JQ_DOCKER_BAKE
111
113
{
112
114
group: {
@@ -116,9 +118,13 @@ define JQ_DOCKER_BAKE
116
118
},
117
119
target: (
118
120
{
121
+ "base-base": {
122
+ dockerfile: "Dockerfile",
123
+ "cache-to": ["type=local,dest=./cache"]
124
+ },
119
125
base: {
120
126
context: "images/base",
121
- dockerfile: "Dockerfile" ,
127
+ inherits: ["base-base"] ,
122
128
args: {
123
129
PYTHON_PACKAGE_VERSION: "${PYTHON_PACKAGE_VERSION}"
124
130
},
@@ -133,7 +139,7 @@ define JQ_DOCKER_BAKE
133
139
($$ARGS.positional[]) | {
134
140
(.): {
135
141
context: ("images/" + .),
136
- dockerfile: "Dockerfile" ,
142
+ inherits: ["base-base"] ,
137
143
args: {
138
144
FROM: "${BASE_IMAGE}"
139
145
},
0 commit comments