Skip to content

Commit 9196208

Browse files
author
Lee Jones
committed
Remove *-onbuild images.
Onbuild images are deemed as 'useful but confusing'. Rather than produce onbuild images, projects should consider providing example Dockerfiles for consumers to use for reference. Almost all official Docker Hub project have removed their onbuilds now. Ref: docker-library/official-images#2076 Ref: docker-library/docs@3823017 Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent b30bb77 commit 9196208

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+19
-1719
lines changed

.travis.yml

-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@ services:
1111

1212
env:
1313
- Dockerfile=v0.12/alpine
14-
- Dockerfile=v0.12/alpine-onbuild
1514
- Dockerfile=v0.12/debian
16-
- Dockerfile=v0.12/debian-onbuild
1715
- Dockerfile=v1.2/alpine
18-
- Dockerfile=v1.2/alpine-onbuild
1916
- Dockerfile=v1.2/debian
20-
- Dockerfile=v1.2/debian-onbuild
2117

2218
before_script:
2319
- make image DOCKERFILE=$Dockerfile VERSION=test

Dockerfile.sample

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fluent/fluentd:v0.12-onbuild
1+
FROM fluent/fluentd:v0.12
22
MAINTAINER YOUR_NAME <...@...>
33

44
RUN apk add --update --virtual .build-deps \
@@ -13,4 +13,7 @@ RUN apk add --update --virtual .build-deps \
1313
&& rm -rf /var/cache/apk/* \
1414
/home/fluent/.gem/ruby/2.3.0/cache/*.gem
1515

16+
COPY fluent.conf /fluentd/etc/
17+
COPY entrypoint.sh /bin/
18+
1619
EXPOSE 24284

Dockerfile.template.erb

-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<% fluentd_ver = version.split("-").first[1..-1] %>
2-
<% is_onbuild = (version.split("-").last == "onbuild") %>
32
<% is_alpine = (dockerfile.split("/").last.split("-").first == "alpine") %>
43
<% is_armhf = (dockerfile.split("/")[1] == "armhf") %>
54
<% is_windows = (dockerfile.split("/").last.split("-").first == "windows") %>
@@ -163,11 +162,6 @@ COPY entrypoint.sh /bin/
163162
RUN chmod +x /bin/entrypoint.sh
164163
<% end %>
165164

166-
<% if is_onbuild %>
167-
ONBUILD COPY fluent.conf /fluentd/etc/
168-
ONBUILD COPY plugins /fluentd/plugins/
169-
<% end %>
170-
171165
ENV FLUENTD_OPT=""
172166
ENV FLUENTD_CONF="fluent.conf"
173167

Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,16 @@
1414
IMAGE_NAME := fluent/fluentd
1515
X86_IMAGES := \
1616
v0.12/alpine:v0.12.43,v0.12 \
17-
v0.12/alpine-onbuild:v0.12.43-onbuild,v0.12-onbuild \
1817
v0.12/debian:v0.12.43-debian,v0.12-debian \
19-
v0.12/debian-onbuild:v0.12.43-debian-onbuild,v0.12-debian-onbuild \
2018
v1.2/alpine:v1.2.6,v1.2,edge,stable,latest \
21-
v1.2/alpine-onbuild:v1.2.6-onbuild,v1.2-onbuild,edge-onbuild,stable-onbuild,onbuild \
2219
v1.2/debian:v1.2.6-debian,v1.2-debian,edge-debian,stable-debian,debian \
23-
v1.2/debian-onbuild:v1.2.6-debian-onbuild,v1.2-debian-onbuild,edge-debian-onbuild,stable-debian-onbuild,debian-onbuild \
2420
v1.2/windows:v1.2.6-windows,stable-windows,windows
2521
# <Dockerfile>:<version>,<tag1>,<tag2>,...
2622

2723
# Define images for running on ARM platforms
2824
ARM_IMAGES := \
2925
v1.2/armhf/debian:v1.2.6-debian-armhf,v1.2-debian-armhf,edge-debian-armhf,stable-debian-armhf,debian-armhf \
30-
v1.2/armhf/debian-onbuild:v1.2.6-debian-armhf-onbuild,v1.2-debian-armhf-onbuild,edge-debian-armhf-onbuild,stable-debian-armhf-onbuild,debian-armhf-onbuild \
3126
v1.2/armhf/alpine:v1.2.6-alpine-armhf,v1.2-alpine-armhf,edge-alpine-armhf,stable-alpine-armhf,alpine-armhf \
32-
v1.2/armhf/alpine-onbuild:v1.2.6-alpine-armhf-onbuild,v1.2-alpine-armhf-onbuild,edge-alpine-armhf-onbuild,stable-alpine-armhf-onbuild,alpine-armhf-onbuild
3327

3428
ALL_IMAGES := $(X86_IMAGES) $(ARM_IMAGES)
3529

README.md

+15-30
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,12 @@ Fluentd Docker Image
1111

1212
- `v0.12.43`, `v0.12`
1313
[(v0.12/alpine/Dockerfile)][101]
14-
- `v0.12.43-onbuild`, `v0.12-onbuild`
15-
[(v0.12/alpine-onbuild/Dockerfile)][102]
1614
- `v0.12.43-debian`, `v0.12-debian`
1715
[(v0.12/debian/Dockerfile)][105]
18-
- `v0.12.43-debian-onbuild`, `v0.12-debian-onbuild`
19-
`debian-onbuild`
20-
[(v0.12/debian-onbuild/Dockerfile)][106]
2116
- `v1.2.6`, `v1.2`, `edge`, `stable`, `latest`
2217
[(v1.2/alpine/Dockerfile)][113]
23-
- `v1.2.6-onbuild`, `v1.2-onbuild`, `edge-onbuild`, `stable-onbuild`, `onbuild`
24-
[(v1.2/alpine-onbuild/Dockerfile)][114]
2518
- `v1.2.6-debian`, `v1.2-debian`, `edge-debian`, `stable-debian`, `debian`
2619
[(v1.2/debian/Dockerfile)][115]
27-
- `v1.2.6-debian-onbuild`, `v1.2-debian-onbuild`, `edge-debian-onbuild`, `v1.1-debian-onbuild`, `stable-debian-onbuild`,
28-
[(v1.2/debian-onbuild/Dockerfile)][116]
2920

3021

3122
We recommend to use debian version for production because it uses jemalloc to mitigate memory fragmentation issue.
@@ -100,8 +91,6 @@ This image is based on the popular [Alpine Linux project][1], available in
10091
Alpine Linux is much smaller than most distribution base images (~5MB), and
10192
thus leads to much slimmer images in general.
10293

103-
Since `v0.12.26`, tags are separated into `vX.Y.Z` and `vX.Y.Z-onbuild`.
104-
10594
### `stable`, `latest`
10695

10796
Latest version of stable Fluentd branch (currently `v1.0`).
@@ -118,12 +107,6 @@ Latest version of `vX.Y` Fluentd branch.
118107

119108
Concrete `vX.Y.Z` version of Fluentd.
120109

121-
### `onbuild`, `xxx-onbuild`
122-
123-
This image makes building derivative images easier.
124-
See ["How to build your own image"](#how-to-build-your-own-image) section for
125-
more details.
126-
127110
### `debian`
128111

129112
The image based on [Debian Linux image][7].
@@ -138,14 +121,14 @@ Furthermore, the base images enable support for cross-platform builds using the
138121

139122
In order to build these images natively on ARM devices, the `CROSS_BUILD_START` and `CROSS_BUILD_END` Docker build arguments must be set to the shell no-op (`:`), for example:
140123
```bash
141-
docker build --build-arg CROSS_BUILD_START=":" --build-arg CROSS_BUILD_END=":" -t fluent/fluentd:v1.2.6-onbuild v1.2/armhf/alpine-onbuild
124+
docker build --build-arg CROSS_BUILD_START=":" --build-arg CROSS_BUILD_END=":" -t fluent/fluentd:v1.2.6 v1.2/armhf/alpine
142125
```
143126
(assuming the command is run from the root of this repository).
144127

145128
## How to build your own image
146129

147-
You can build a customized image based on Fluentd's `onbuild` image.
148-
Customized image can include plugins and `fluent.conf` file.
130+
You can build a customized image based on the supplied `Dockerfile.sample` template.
131+
Customized image can include plugins and `fluent.conf` file (See 'COPY' instructions).
149132

150133

151134
### 1. Create a working directory
@@ -160,8 +143,8 @@ cd custom-fluentd
160143

161144
# Download default fluent.conf. This file will be copied to the new image.
162145
# VERSION is v0.12 or v0.14 like fluentd version and OS is alpine or debian.
163-
# Full example is https://raw.githubusercontent.com/fluent/fluentd-docker-image/master/v0.12/debian-onbuild/fluent.conf
164-
curl https://raw.githubusercontent.com/fluent/fluentd-docker-image/master/VERSION/OS-onbuild/fluent.conf > fluent.conf
146+
# Full example is https://raw.githubusercontent.com/fluent/fluentd-docker-image/master/v0.12/debian/fluent.conf
147+
curl https://raw.githubusercontent.com/fluent/fluentd-docker-image/master/VERSION/OS/fluent.conf > fluent.conf
165148

166149
# Create plugins directory. plugins scripts put here will be copied to the new image.
167150
mkdir plugins
@@ -183,8 +166,8 @@ To add plugins, edit `Dockerfile` as following:
183166
##### Alpine version
184167

185168
```Dockerfile
186-
# or v1.0-onbuild
187-
FROM fluent/fluentd:v0.12-onbuild
169+
# or v1.0
170+
FROM fluent/fluentd:v0.12
188171

189172
# below RUN includes plugin as examples elasticsearch is not required
190173
# you may customize including plugins as you wish
@@ -197,13 +180,16 @@ RUN apk add --update --virtual .build-deps \
197180
&& apk del .build-deps \
198181
&& rm -rf /var/cache/apk/* \
199182
/home/fluent/.gem/ruby/2.4.0/cache/*.gem
183+
184+
COPY fluent.conf /fluentd/etc/
185+
COPY entrypoint.sh /bin/
200186
```
201187

202188
##### Debian version
203189

204190
```Dockerfile
205-
# or v1.0-debian-onbuild
206-
FROM fluent/fluentd:v0.12-debian-onbuild
191+
# or v1.0-debian
192+
FROM fluent/fluentd:v0.12-debian
207193

208194
# below RUN includes plugin as examples elasticsearch is not required
209195
# you may customize including plugins as you wish
@@ -220,6 +206,9 @@ RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev" \
220206
$buildDeps \
221207
&& rm -rf /var/lib/apt/lists/* \
222208
/home/fluent/.gem/ruby/2.3.0/cache/*.gem
209+
210+
COPY fluent.conf /fluentd/etc/
211+
COPY entrypoint.sh /bin/
223212
```
224213

225214
##### Note
@@ -290,10 +279,6 @@ through a [GitHub issue](https://github.com/fluent/fluentd-docker-image/issues).
290279
[6]: https://docs.docker.com/engine/reference/logging/fluentd
291280
[7]: https://hub.docker.com/_/debian
292281
[101]: https://github.com/fluent/fluentd-docker-image/blob/master/v0.12/alpine/Dockerfile
293-
[102]: https://github.com/fluent/fluentd-docker-image/blob/master/v0.12/alpine-onbuild/Dockerfile
294282
[105]: https://github.com/fluent/fluentd-docker-image/blob/master/v0.12/debian/Dockerfile
295-
[106]: https://github.com/fluent/fluentd-docker-image/blob/master/v0.12/debian-onbuild/Dockerfile
296283
[113]: https://github.com/fluent/fluentd-docker-image/blob/master/v1.2/alpine/Dockerfile
297-
[114]: https://github.com/fluent/fluentd-docker-image/blob/master/v1.2/alpine-onbuild/Dockerfile
298284
[115]: https://github.com/fluent/fluentd-docker-image/blob/master/v1.2/debian/Dockerfile
299-
[116]: https://github.com/fluent/fluentd-docker-image/blob/master/v1.2/debian-onbuild/Dockerfile

v0.12/alpine-onbuild/Dockerfile

-55
This file was deleted.

v0.12/alpine-onbuild/entrypoint.sh

-27
This file was deleted.

v0.12/alpine-onbuild/fluent.conf

-33
This file was deleted.

v0.12/alpine-onbuild/hooks/post_push

-15
This file was deleted.

0 commit comments

Comments
 (0)