Skip to content

Commit 8eeb831

Browse files
Remove manual SBOMs
Syft is now detecting OpenSSL and Erlanf binaries and rabbitmq erlang package
1 parent 1f3e8eb commit 8eeb831

File tree

8 files changed

+6
-125
lines changed

8 files changed

+6
-125
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
.jq-template.awk
2-
.template-helper-functions.jq

3.12/alpine/Dockerfile

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.12/ubuntu/Dockerfile

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/alpine/Dockerfile

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/ubuntu/Dockerfile

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-alpine.template

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Alpine Linux is not officially supported by the RabbitMQ team -- use at your own risk!
2-
{{ include ".template-helper-functions" }}
32
FROM alpine:{{ .alpine.version }} as build-base
43

54
RUN apk add --no-cache \
@@ -235,34 +234,7 @@ ENV ERLANG_INSTALL_PATH_PREFIX /opt/erlang
235234
ENV OPENSSL_INSTALL_PATH_PREFIX /opt/openssl
236235

237236
COPY --from=erlang-builder $ERLANG_INSTALL_PATH_PREFIX $ERLANG_INSTALL_PATH_PREFIX
238-
RUN echo '{{
239-
{
240-
name: "erlang",
241-
version: .otp.version,
242-
params: {
243-
os_name: "alpine",
244-
os_version: .alpine.version
245-
},
246-
licenses: [
247-
"Apache-2.0"
248-
]
249-
} | sbom | tostring
250-
}}' > $ERLANG_INSTALL_PATH_PREFIX/erlang.spdx.json
251-
252237
COPY --from=openssl-builder $OPENSSL_INSTALL_PATH_PREFIX $OPENSSL_INSTALL_PATH_PREFIX
253-
RUN echo '{{
254-
{
255-
name: "openssl",
256-
version: .openssl.version,
257-
params: {
258-
os_name: "alpine",
259-
os_version: .alpine.version
260-
},
261-
licenses: [
262-
"Apache-2.0"
263-
]
264-
} | sbom | tostring
265-
}}' > $OPENSSL_INSTALL_PATH_PREFIX/openssl.spdx.json
266238

267239
ENV PATH $ERLANG_INSTALL_PATH_PREFIX/bin:$OPENSSL_INSTALL_PATH_PREFIX/bin:$PATH
268240

@@ -361,22 +333,7 @@ RUN set -eux; \
361333
su-exec rabbitmq rabbitmqctl list_ciphers; \
362334
su-exec rabbitmq rabbitmq-plugins list; \
363335
# no stale cookies
364-
rm "$RABBITMQ_DATA_DIR/.erlang.cookie";\
365-
\
366-
echo '{{
367-
{
368-
name: "rabbitmq",
369-
version: .version,
370-
params: {
371-
os_name: "alpine",
372-
os_version: .alpine.version
373-
},
374-
licenses: [
375-
"MPL-2.0",
376-
"Apache-2.0"
377-
]
378-
} | sbom | tostring
379-
}}' > $RABBITMQ_HOME/rabbitmq.spdx.json;
336+
rm "$RABBITMQ_DATA_DIR/.erlang.cookie"
380337

381338
# Enable Prometheus-style metrics by default (https://github.com/docker-library/rabbitmq/issues/419)
382339
RUN su-exec rabbitmq rabbitmq-plugins enable --offline rabbitmq_prometheus

Dockerfile-ubuntu.template

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# The official Canonical Ubuntu Focal image is ideal from a security perspective,
22
# especially for the enterprises that we, the RabbitMQ team, have to deal with
3-
{{ include ".template-helper-functions" }}
43
FROM ubuntu:{{ .ubuntu.version }} as build-base
54

65
ARG BUILDKIT_SBOM_SCAN_STAGE=true
@@ -234,34 +233,7 @@ FROM ubuntu:{{ .ubuntu.version }}
234233
ENV ERLANG_INSTALL_PATH_PREFIX /opt/erlang
235234
ENV OPENSSL_INSTALL_PATH_PREFIX /opt/openssl
236235
COPY --from=erlang-builder $ERLANG_INSTALL_PATH_PREFIX $ERLANG_INSTALL_PATH_PREFIX
237-
RUN echo '{{
238-
{
239-
name: "erlang",
240-
version: .otp.version,
241-
params: {
242-
os_name: "ubuntu",
243-
os_version: .ubuntu.version
244-
},
245-
licenses: [
246-
"Apache-2.0"
247-
]
248-
} | sbom | tostring
249-
}}' > $ERLANG_INSTALL_PATH_PREFIX/erlang.spdx.json
250-
251236
COPY --from=openssl-builder $OPENSSL_INSTALL_PATH_PREFIX $OPENSSL_INSTALL_PATH_PREFIX
252-
RUN echo '{{
253-
{
254-
name: "openssl",
255-
version: .openssl.version,
256-
params: {
257-
os_name: "ubuntu",
258-
os_version: .ubuntu.version
259-
},
260-
licenses: [
261-
"Apache-2.0"
262-
]
263-
} | sbom | tostring
264-
}}' > $OPENSSL_INSTALL_PATH_PREFIX/openssl.spdx.json
265237

266238
ENV PATH $ERLANG_INSTALL_PATH_PREFIX/bin:$OPENSSL_INSTALL_PATH_PREFIX/bin:$PATH
267239

@@ -355,22 +327,7 @@ RUN set -eux; \
355327
gosu rabbitmq rabbitmqctl list_ciphers; \
356328
gosu rabbitmq rabbitmq-plugins list; \
357329
# no stale cookies
358-
rm "$RABBITMQ_DATA_DIR/.erlang.cookie"; \
359-
\
360-
echo '{{
361-
{
362-
name: "rabbitmq",
363-
version: .version,
364-
params: {
365-
os_name: "ubuntu",
366-
os_version: .ubuntu.version
367-
},
368-
licenses: [
369-
"MPL-2.0",
370-
"Apache-2.0"
371-
]
372-
} | sbom | tostring
373-
}}' > $RABBITMQ_HOME/rabbitmq.spdx.json
330+
rm "$RABBITMQ_DATA_DIR/.erlang.cookie"
374331

375332
# Enable Prometheus-style metrics by default (https://github.com/docker-library/rabbitmq/issues/419)
376333
RUN gosu rabbitmq rabbitmq-plugins enable --offline rabbitmq_prometheus

apply-templates.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ elif [ "$BASH_SOURCE" -nt "$jqt" ]; then
1313
wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk'
1414
fi
1515

16-
jqf='.template-helper-functions.jq'
17-
if [ -n "${BASHBREW_SCRIPTS:-}" ]; then
18-
jqf="$BASHBREW_SCRIPTS/template-helper-functions.jq"
19-
elif [ "$BASH_SOURCE" -nt "$jqf" ]; then
20-
# https://github.com/docker-library/bashbrew/blob/master/scripts/template-helper-functions.jq
21-
wget -qO "$jqf" 'https://github.com/docker-library/bashbrew/raw/5a86c34c5a3ef370b3d22c398d45ccab53bd64bd/scripts/template-helper-functions.jq'
22-
fi
23-
2416
if [ "$#" -eq 0 ]; then
2517
versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)"
2618
eval "set -- $versions"

0 commit comments

Comments
 (0)