Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Sep 26, 2023
1 parent 9e6fe95 commit 4be259a
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 47 deletions.
18 changes: 13 additions & 5 deletions 3.10/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions 3.11/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions 3.12/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions 3.13-rc/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions 3.9/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 44 additions & 22 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,14 @@ FROM alpine:{{ .alpine.version }}
# OPENSSL/ERLANG_INSTALL_PATH_PREFIX are defined in a different stage, so define them again
ENV ERLANG_INSTALL_PATH_PREFIX /opt/erlang
ENV OPENSSL_INSTALL_PATH_PREFIX /opt/openssl
COPY --from=erlang-builder $ERLANG_INSTALL_PATH_PREFIX $ERLANG_INSTALL_PATH_PREFIX
COPY --from=openssl-builder $OPENSSL_INSTALL_PATH_PREFIX $OPENSSL_INSTALL_PATH_PREFIX
ENV PATH $ERLANG_INSTALL_PATH_PREFIX/bin:$OPENSSL_INSTALL_PATH_PREFIX/bin:$PATH

RUN mkdir -p /usr/local/share/sbom/ && \
<<EOT cat > /usr/local/share/sbom/openssl-erlang.spdx.json
COPY --from=erlang-builder $ERLANG_INSTALL_PATH_PREFIX $ERLANG_INSTALL_PATH_PREFIX
COPY <<OPENSSL_SPDX /opt/openssl/openssl.spdx.json
{{
{
spdxVersion: "SPDX-2.3",
SPDXID: "SPDXRef-DOCUMENT",
name: "openssl-erlang-sbom",
documentNamespace: "https://docker.com/docker-scout/fs/sbom-61b3df18-3e41-47b8-a954-e4224f48b2f7",
dataLicense: "CC0-1.0",
name: "openssl-sbom",
packages: [
{
name: "openssl",
Expand All @@ -255,7 +250,20 @@ RUN mkdir -p /usr/local/share/sbom/ && \
referenceLocator: ("pkg:apk/alpine/openssl@" + .openssl.version +"?os_name=alpine\u0026os_version=" + .alpine.version)
}
]
},
}
]
} | tostring
}}
OPENSSL_SPDX

COPY --from=openssl-builder $OPENSSL_INSTALL_PATH_PREFIX $OPENSSL_INSTALL_PATH_PREFIX
COPY <<ERLANG_SPDX /opt/erlang/erlang.spdx.json
{{
{
spdxVersion: "SPDX-2.3",
SPDXID: "SPDXRef-DOCUMENT",
name: "erlang-sbom",
packages: [
{
name: "erlang",
versionInfo: .otp.version,
Expand All @@ -267,23 +275,13 @@ RUN mkdir -p /usr/local/share/sbom/ && \
referenceLocator: ("pkg:apk/alpine/erlang@" + .otp.version +"?os_name=alpine\u0026os_version=" + .alpine.version)
}
]
},
{
name: "rabbitmq",
versionInfo: .version,
SPDXID: "SPDXRef-Package--rabbitmq",
externalRefs: [
{
referenceCategory: "PACKAGE-MANAGER",
referenceType: "purl",
referenceLocator: ("pkg:github/rabbitmq/rabbitmq-server@" + .version)
}
]
}
]
} | tostring
}}
EOT
ERLANG_SPDX

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

ENV RABBITMQ_DATA_DIR /var/lib/rabbitmq

Expand Down Expand Up @@ -382,6 +380,30 @@ RUN set -eux; \
# no stale cookies
rm "$RABBITMQ_DATA_DIR/.erlang.cookie"

COPY <<RABBITMQ_SPDX /opt/rabbitmq/rabbitmq.spdx.json
{{
{
spdxVersion: "SPDX-2.3",
SPDXID: "SPDXRef-DOCUMENT",
name: "rabbitmq-sbom",
packages: [
{
name: "rabbitmq",
versionInfo: .version,
SPDXID: "SPDXRef-Package--rabbitmq",
externalRefs: [
{
referenceCategory: "PACKAGE-MANAGER",
referenceType: "purl",
referenceLocator: ("pkg:generic/rabbitmq@" + .version + "?os_name=alpine\u0026os_version=" + .alpine.version)
}
]
}
]
} | tostring
}}
RABBITMQ_SPDX

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

Expand Down

0 comments on commit 4be259a

Please sign in to comment.