@@ -26,23 +26,31 @@ FLB_REPOSITORY ?= "https://github.com/amazon-contributing/upstream-to-fluent-bit
26
26
dev : DOCKER_BUILD_FLAGS =
27
27
dev : release
28
28
29
- .PHONY : build-common
30
- build-common :
31
- docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:build-deps-al${AL_TAG} -f ./scripts/dockerfiles/build/Dockerfile.deps-al${AL_TAG} .
32
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} --build-arg FLB_VERSION=${FLB_VERSION} --build-arg FLB_REPOSITORY=${FLB_REPOSITORY} -t amazon/aws-for-fluent-bit:build-common-al${AL_TAG} -f ./scripts/dockerfiles/build/Dockerfile.build-common .
33
- docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:golang -f ./scripts/dockerfiles/build/Dockerfile.golang .
34
- docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:compile-init-al${AL_TAG} -f ./scripts/dockerfiles/build/Dockerfile.compile-init .
29
+ .PHONY : release
30
+ release : build build-init linux-plugins
31
+ docker system prune -f
32
+ docker build $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} -t amazon/aws-for-fluent-bit:main-release -f ./scripts/dockerfiles/Dockerfile.main-release .
33
+ docker tag amazon/aws-for-fluent-bit:main-release amazon/aws-for-fluent-bit:latest
34
+ docker system prune -f
35
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-latest -f ./scripts/dockerfiles/Dockerfile.init-release .
36
+
37
+ .PHONY : debug
38
+ debug : main-debug init-debug
35
39
36
40
.PHONY : build
37
- build : build-common
38
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg BUILD_IMAGE=amazon/aws-for-fluent-bit:build-common-al${AL_TAG} -t amazon/aws-for-fluent-bit:compile-al${AL_TAG} -f ./scripts/dockerfiles/build/Dockerfile.compile .
41
+ build :
42
+ docker system prune -f
43
+ docker build $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} --build-arg FLB_VERSION=${FLB_VERSION} --build-arg FLB_REPOSITORY=${FLB_REPOSITORY} -t amazon/aws-for-fluent-bit:build -f ./scripts/dockerfiles/Dockerfile.build .
39
44
40
- .PHONY : build-debug
41
- build-debug : build-common
42
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg BUILD_IMAGE=amazon/aws-for-fluent-bit:build-common-al ${AL_TAG} --build-arg DEBUG=On --build-arg RELEASE=Off - t amazon/aws-for-fluent-bit:compile-debug-al ${AL_TAG} -f ./scripts/dockerfiles/build/ Dockerfile.compile .
45
+ .PHONY : build-init
46
+ build-init :
47
+ docker build $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG= ${AL_TAG} -t amazon/aws-for-fluent-bit:build-init -f ./scripts/dockerfiles/Dockerfile.build-init .
43
48
44
- .PHONY : windows-plugins
49
+ # TODO: the bash script opts does not work on developer Macs
45
50
windows-plugins : export OS_TYPE = windows
51
+ linux-plugins : export OS_TYPE = linux
52
+
53
+ .PHONY : windows-plugins
46
54
windows-plugins :
47
55
./scripts/build_plugins.sh \
48
56
--KINESIS_PLUGIN_CLONE_URL=${KINESIS_PLUGIN_CLONE_URL} \
@@ -57,7 +65,6 @@ windows-plugins:
57
65
--DOCKER_BUILD_FLAGS=${DOCKER_BUILD_FLAGS}
58
66
59
67
.PHONY : linux-plugins
60
- linux-plugins : export OS_TYPE = linux
61
68
linux-plugins :
62
69
./scripts/build_plugins.sh \
63
70
--KINESIS_PLUGIN_CLONE_URL=${KINESIS_PLUGIN_CLONE_URL} \
@@ -71,64 +78,88 @@ linux-plugins:
71
78
--CLOUDWATCH_PLUGIN_BRANCH=${CLOUDWATCH_PLUGIN_BRANCH} \
72
79
--DOCKER_BUILD_FLAGS=${DOCKER_BUILD_FLAGS}
73
80
74
- .PHONY : release
75
- release : build linux-plugins
76
- docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.deps-al${AL_TAG} .
77
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -t amazon/aws-for-fluent-bit:latest-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile .
78
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-init-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:latest-al${AL_TAG} -t amazon/aws-for-fluent-bit:init-latest-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.init .
81
+ # Debug and debug init images
82
+ .PHONY : main-debug
83
+ main-debug : debug-s3
84
+ docker tag amazon/aws-for-fluent-bit:debug-s3 amazon/aws-for-fluent-bit:debug
79
85
80
- .PHONY : debug
81
- debug : build-debug linux-plugins
82
- docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:runtime-deps-debug-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.deps-debug-al${AL_TAG} .
83
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-debug-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-deps-debug-al${AL_TAG} -t amazon/aws-for-fluent-bit:runtime-debug-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile .
84
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-debug-al${AL_TAG} -t amazon/aws-for-fluent-bit:runtime-debug-common-${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.debug-common .
85
- # s3 images
86
- docker build $(DOCKER_BUILD_FLAGS) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-debug-common-${AL_TAG} -t amazon/aws-for-fluent-bit:debug-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.debug .
87
- docker build $(DOCKER_BUILD_FLAGS) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-init-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:debug-al${AL_TAG} -t amazon/aws-for-fluent-bit:runtime-init-debug-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.init .
88
- docker build $(DOCKER_BUILD_FLAGS) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-init-debug-al${AL_TAG} -t amazon/aws-for-fluent-bit:init-debug-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.init-debug .
89
- # efs images
90
- docker build $(DOCKER_BUILD_FLAGS) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-debug-common-${AL_TAG} -t amazon/aws-for-fluent-bit:debug-efs-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.debug-efs .
91
- docker build $(DOCKER_BUILD_FLAGS) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-init-debug-al${AL_TAG} -t amazon/aws-for-fluent-bit:init-debug-efs-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.init-debug-efs .
86
+ .PHONY : init-debug
87
+ init-debug : init-debug-s3
88
+ docker tag amazon/aws-for-fluent-bit:init-debug-s3 amazon/aws-for-fluent-bit:init-debug
92
89
93
- .PHONY : debug-valgrind
94
- debug-valgrind : debug
95
- docker build $(DOCKER_BUILD_FLAGS ) --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-debug-common-${AL_TAG} -t amazon/aws-for-fluent-bit:debug-valgrind-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.debug-valgrind .
90
+ # Build all main debug images (Don't build the dependencies multiple times)
91
+ .PHONY : main-debug-all
92
+ main-debug-all : main-debug-base
93
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-fs -f ./scripts/dockerfiles/Dockerfile.main-debug-fs .
94
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-s3 -f ./scripts/dockerfiles/Dockerfile.main-debug-s3 .
95
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-valgrind -f ./scripts/dockerfiles/Dockerfile.main-debug-valgrind .
96
+ docker tag amazon/aws-for-fluent-bit:debug-s3 amazon/aws-for-fluent-bit:debug
96
97
97
- .PHONY : cloudwatch-dev
98
- cloudwatch-dev : export OS_TYPE = linux
99
- cloudwatch-dev : build
100
- ./scripts/build_plugins.sh \
101
- --CLOUDWATCH_PLUGIN_CLONE_URL=${CLOUDWATCH_PLUGIN_CLONE_URL} \
102
- --CLOUDWATCH_PLUGIN_BRANCH=${CLOUDWATCH_PLUGIN_BRANCH} \
103
- --DOCKER_BUILD_FLAGS=${DOCKER_BUILD_FLAGS}
104
- docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.deps-al${AL_TAG} .
105
- docker build $(DOCKER_BUILD_FLAGS) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -t amazon/aws-for-fluent-bit:latest-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile .
98
+ # Debug images
99
+ .PHONY : debug-fs
100
+ debug-fs : main-debug-base
101
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-fs -f ./scripts/dockerfiles/Dockerfile.main-debug-fs .
106
102
107
- .PHONY : firehose-dev
108
- firehose-dev : export OS_TYPE = linux
109
- firehose-dev : build
110
- ./scripts/build_plugins.sh \
111
- --FIREHOSE_PLUGIN_CLONE_URL=${FIREHOSE_PLUGIN_CLONE_URL} \
112
- --FIREHOSE_PLUGIN_BRANCH=${FIREHOSE_PLUGIN_BRANCH} \
113
- --DOCKER_BUILD_FLAGS=${DOCKER_BUILD_FLAGS}
114
- docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.deps-al${AL_TAG} .
115
- docker build $(DOCKER_BUILD_FLAGS) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -t amazon/aws-for-fluent-bit:latest-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile .
103
+ .PHONY : debug-s3
104
+ debug-s3 : main-debug-base
105
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-s3 -f ./scripts/dockerfiles/Dockerfile.main-debug-s3 .
116
106
117
- .PHONY : kinesis-dev
118
- kinesis-dev : export OS_TYPE = linux
119
- kinesis-dev : build
120
- ./scripts/build_plugins.sh \
121
- --KINESIS_PLUGIN_CLONE_URL=${KINESIS_PLUGIN_CLONE_URL} \
122
- --KINESIS_PLUGIN_BRANCH=${KINESIS_PLUGIN_BRANCH} \
123
- --DOCKER_BUILD_FLAGS=${DOCKER_BUILD_FLAGS}
124
- docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile.deps-al${AL_TAG} .
125
- docker build $(DOCKER_BUILD_FLAGS) --build-arg COMPILE_IMAGE=amazon/aws-for-fluent-bit:compile-al${AL_TAG} --build-arg RUNTIME_IMAGE=amazon/aws-for-fluent-bit:runtime-deps-al${AL_TAG} -t amazon/aws-for-fluent-bit:latest-al${AL_TAG} -f ./scripts/dockerfiles/runtime/Dockerfile .
107
+ .PHONY : debug-valgrind
108
+ debug-valgrind : main-debug-base
109
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:debug-valgrind -f ./scripts/dockerfiles/Dockerfile.main-debug-valgrind .
110
+
111
+ # Build all init debug images (Don't build the dependencies multiple times)
112
+ .PHONY : init-debug-all
113
+ init-debug-all : main-debug-base build-init
114
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-base -f ./scripts/dockerfiles/Dockerfile.init-debug-base .
115
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-fs -f ./scripts/dockerfiles/Dockerfile.init-debug-fs .
116
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-s3 -f ./scripts/dockerfiles/Dockerfile.init-debug-s3 .
117
+ docker tag amazon/aws-for-fluent-bit:init-debug-s3 amazon/aws-for-fluent-bit:init-debug
118
+
119
+ # Debug init images
120
+ .PHONY : init-debug-fs
121
+ init-debug-fs : main-debug-base build-init
122
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-base -f ./scripts/dockerfiles/Dockerfile.init-debug-base .
123
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-fs -f ./scripts/dockerfiles/Dockerfile.init-debug-fs .
124
+
125
+ .PHONY : init-debug-s3
126
+ init-debug-s3 : main-debug-base build-init
127
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-base -f ./scripts/dockerfiles/Dockerfile.init-debug-base .
128
+ docker build $(DOCKER_BUILD_FLAGS ) -t amazon/aws-for-fluent-bit:init-debug-s3 -f ./scripts/dockerfiles/Dockerfile.init-debug-s3 .
129
+
130
+ .PHONY : main-debug-base
131
+ main-debug-base : build linux-plugins
132
+ docker build $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} -t amazon/aws-for-fluent-bit:main-debug-base -f ./scripts/dockerfiles/Dockerfile.main-debug-base .
126
133
127
134
.PHONY : validate-version-file-format
128
135
validate-version-file-format :
129
136
jq -e . windows.versions && true || false
130
137
jq -e . linux.version && true || false
131
138
139
+ .PHONY : cloudwatch-dev
140
+ cloudwatch-dev :
141
+ docker build \
142
+ --build-arg CLOUDWATCH_PLUGIN_CLONE_URL=${CLOUDWATCH_PLUGIN_CLONE_URL} \
143
+ --build-arg CLOUDWATCH_PLUGIN_BRANCH=${CLOUDWATCH_PLUGIN_BRANCH} \
144
+ $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} -t aws-fluent-bit-plugins:latest -f ./scripts/dockerfiles/Dockerfile.plugins .
145
+ docker build -t amazon/aws-for-fluent-bit:latest -f ./scripts/dockerfiles/Dockerfile .
146
+
147
+ .PHONY : firehose-dev
148
+ firehose-dev :
149
+ docker build \
150
+ --build-arg FIREHOSE_PLUGIN_CLONE_URL=${FIREHOSE_PLUGIN_CLONE_URL} \
151
+ --build-arg FIREHOSE_PLUGIN_BRANCH=${FIREHOSE_PLUGIN_BRANCH} \
152
+ $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} -t aws-fluent-bit-plugins:latest -f ./scripts/dockerfiles/Dockerfile.plugins .
153
+ docker build -t amazon/aws-for-fluent-bit:latest -f ./scripts/dockerfiles/Dockerfile .
154
+
155
+ .PHONY : kinesis-dev
156
+ kinesis-dev :
157
+ docker build \
158
+ --build-arg KINESIS_PLUGIN_CLONE_URL=${KINESIS_PLUGIN_CLONE_URL} \
159
+ --build-arg KINESIS_PLUGIN_BRANCH=${KINESIS_PLUGIN_BRANCH} \
160
+ $(DOCKER_BUILD_FLAGS ) --build-arg AL_TAG=${AL_TAG} -t aws-fluent-bit-plugins:latest -f ./scripts/dockerfiles/Dockerfile.plugins .
161
+ docker build -t amazon/aws-for-fluent-bit:latest -f ./scripts/dockerfiles/Dockerfile .
162
+
132
163
integ/out :
133
164
mkdir -p integ/out
134
165
@@ -183,10 +214,26 @@ delete-resources:
183
214
184
215
.PHONY : clean
185
216
clean :
186
- rm -rf ./build ./integ/out
187
- # Remove all amazon/aws-for-fluent-bit tagged images
188
- docker images --format "table {{.Repository}}:{{.Tag}}" | grep "^amazon/aws-for-fluent-bit:" | xargs -r docker image remove -f
189
- # Remove aws-fluent-bit-plugins images
190
- docker images --format "table {{.Repository}}:{{.Tag}}" | grep "^aws-fluent-bit-plugins:" | xargs -r docker image remove -f
191
- # Clean up dangling images
192
- docker image prune -a -f
217
+ rm -rf ./build
218
+ rm -rf ./integ/out
219
+ docker image remove -f aws-fluent-bit-plugins:latest
220
+
221
+ docker image remove -f amazon/aws-for-fluent-bit:latest
222
+ docker image remove -f amazon/aws-for-fluent-bit:init-latest
223
+ docker image remove -f amazon/aws-for-fluent-bit:debug
224
+ docker image remove -f amazon/aws-for-fluent-bit:init-debug
225
+
226
+ docker image remove -f amazon/aws-for-fluent-bit:build
227
+ docker image remove -f amazon/aws-for-fluent-bit:build-init
228
+ docker image remove -f amazon/aws-for-fluent-bit:init-debug-base
229
+ docker image remove -f amazon/aws-for-fluent-bit:main-debug-base
230
+
231
+ docker image remove -f amazon/aws-for-fluent-bit:init-release
232
+ docker image remove -f amazon/aws-for-fluent-bit:main-release
233
+ docker image remove -f amazon/aws-for-fluent-bit:debug-fs
234
+ docker image remove -f amazon/aws-for-fluent-bit:debug-s3
235
+ docker image remove -f amazon/aws-for-fluent-bit:debug-valgrind
236
+ docker image remove -f amazon/aws-for-fluent-bit:init-debug-fs
237
+ docker image remove -f amazon/aws-for-fluent-bit:init-debug-s3
238
+
239
+ docker image prune -f
0 commit comments