Skip to content

Commit 361f978

Browse files
author
SUSE Update Bot
committed
πŸ€–: Update build recipes from templates
1 parent e6a17b0 commit 361f978

7 files changed

Lines changed: 215 additions & 0 deletions

File tree

β€Ž.obs/workflows.ymlβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ staging_build:
1313
source_project: home:defolos:BCI:CR:SLE-15-SP7
1414
source_package: base-fips-image
1515
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
16+
- branch_package:
17+
source_project: home:defolos:BCI:CR:SLE-15-SP7
18+
source_package: bind-image
19+
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
1620
- branch_package:
1721
source_project: home:defolos:BCI:CR:SLE-15-SP7
1822
source_package: blackbox_exporter-image
@@ -259,6 +263,9 @@ refresh_devel_BCI:
259263
- trigger_services:
260264
project: devel:BCI:SLE-15-SP7
261265
package: base-fips-image
266+
- trigger_services:
267+
project: devel:BCI:SLE-15-SP7
268+
package: bind-image
262269
- trigger_services:
263270
project: devel:BCI:SLE-15-SP7
264271
package: blackbox_exporter-image

β€Žbind-image/Dockerfileβ€Ž

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
# Copyright (c) 2025 SUSE LLC
4+
5+
# All modifications and additions to the file contributed by third parties
6+
# remain the property of their copyright owners, unless otherwise agreed
7+
# upon.
8+
9+
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
10+
# It is maintained by the BCI team and generated by
11+
# https://github.com/SUSE/BCI-dockerfile-generator
12+
13+
# Please submit bugfixes or comments via https://bugs.opensuse.org/
14+
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
15+
16+
#!UseOBSRepositories
17+
18+
#!BuildTag: suse/bind:9-%RELEASE%
19+
#!BuildTag: suse/bind:9
20+
#!BuildTag: suse/bind:%%bind_major_minor%%
21+
#!BuildTag: suse/bind:%%bind_major_minor_patch%%
22+
#!BuildName: suse-bind-9
23+
#!BuildVersion: 15.7.9
24+
FROM suse/sle15:15.7
25+
26+
RUN set -euo pipefail; \
27+
zypper -n install --no-recommends bind; \
28+
zypper -n clean; \
29+
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
30+
31+
# Define labels according to https://en.opensuse.org/Building_derived_containers
32+
# labelprefix=com.suse.application.bind
33+
LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions"
34+
LABEL org.opencontainers.image.title="SLE ISC BIND 9"
35+
LABEL org.opencontainers.image.description="ISC BIND 9 container based on the SLE Base Container Image."
36+
LABEL org.opencontainers.image.version="9"
37+
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/"
38+
LABEL org.opencontainers.image.created="%BUILDTIME%"
39+
LABEL org.opencontainers.image.vendor="SUSE LLC"
40+
LABEL org.opencontainers.image.source="%SOURCEURL%"
41+
LABEL org.opencontainers.image.ref.name="9-%RELEASE%"
42+
LABEL org.opensuse.reference="registry.suse.com/suse/bind:9-%RELEASE%"
43+
LABEL org.openbuildservice.disturl="%DISTURL%"
44+
LABEL com.suse.supportlevel="techpreview"
45+
LABEL com.suse.eula="sle-eula"
46+
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15"
47+
LABEL com.suse.release-stage="beta"
48+
# endlabelprefix
49+
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md"
50+
ENV RNDC_KEYSIZE="512"
51+
ENV NAMED_ARGS=""
52+
ENV NAMED_INITIALIZE_SCRIPTS=""
53+
ENV NAMED_CONF="/etc/named.conf"
54+
55+
EXPOSE 53/tcp 53/udp 953/tcp 853/tcp 443/tcp
56+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
57+
COPY healthcheck.sh /usr/local/bin/healthcheck.sh
58+
RUN set -euo pipefail; \
59+
chmod +x /usr/local/bin/entrypoint.sh; \
60+
chmod +x /usr/local/bin/healthcheck.sh;
61+
62+
# patch named.prep to not call logger (provided by systemd)
63+
# and just log to stdout
64+
RUN set -euo pipefail; \
65+
mkdir -p /usr/local/lib/bind; \
66+
cp /usr/lib/bind/named.prep /usr/local/lib/bind/named.prep; \
67+
sed -i -e 's|logger "Warning: \$1"|echo "Warning: \$1" >\&2|' -e '/\. \$SYSCONFIG_FILE/d' /usr/local/lib/bind/named.prep
68+
69+
# create directories that tmpfiles.d would create for us
70+
RUN set -euo pipefail; \
71+
mkdir -p /run/named; chown root:named /run/named; chmod 1775 /run/named; \
72+
mkdir -p /var/lib/named; chown root:named /var/lib/named; chmod 1775 /var/lib/named; \
73+
mkdir -p /var/lib/named/dyn; chown named:named /var/lib/named/dyn; chmod 755 /var/lib/named/dyn; \
74+
mkdir -p /var/lib/named/master; chown named:named /var/lib/named/master; chmod 755 /var/lib/named/master; \
75+
mkdir -p /var/lib/named/slave; chown named:named /var/lib/named/slave; chmod 755 /var/lib/named/slave; \
76+
mkdir -p /var/log/named; chown named:named /var/log/named; chmod 750 /var/log/named;
77+
# create files that tmpfiles.d would create for us
78+
RUN set -euo pipefail; touch /var/lib/named/127.0.0.zone /var/lib/named/localhost.zone /var/lib/named/named.root.key /var/lib/named/root.hint
79+
80+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
81+
HEALTHCHECK --interval=10s --timeout=5s --retries=10 CMD ["/usr/local/bin/healthcheck.sh"]
82+

β€Žbind-image/README.mdβ€Ž

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SLE ISC BIND 9: BIND9 Application Container
2+
![Support Level](https://img.shields.io/badge/Support_Level-techpreview-blue)[![SLSA](https://img.shields.io/badge/SLSA_(v1.0)-Build_L3-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/)
3+
[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify)
4+
5+
## Description
6+
7+
BIND (Berkeley Internet Name Domain) is a suite of software for interacting
8+
with the Domain Name System (DNS). Its core component, `named`, serves as both
9+
an authoritative name server for DNS zones and a recursive resolver for network
10+
queries.
11+
12+
## Usage
13+
14+
This container image provides the `named` daemon from
15+
SLE 15 SP7, including the default configuration that comes
16+
with the RPM package.
17+
18+
When no additional parameters are specified, the container entrypoint launches `named` in the foreground mode by default:
19+
20+
```ShellSession
21+
$ podman run --rm -d -p 53/udp registry.suse.com/suse/bind:9
22+
```
23+
24+
### Health Check
25+
26+
The container includes a health check script that performs a simple A-record
27+
lookup and verifies that a valid IPv4 address is returned.
28+
29+
### Environment Variables
30+
31+
The container entrypoint accepts the following environment variables:
32+
33+
- **`NAMED_CONF`** (default: `/etc/named.conf`): Path to the configuration file
34+
for `named`. See the [upstream
35+
documentation](https://bind9.readthedocs.io/en/latest/chapter3.html) for
36+
syntax details.
37+
38+
- **`NAMED_CHECKCONF_BIN`** (default: `/usr/bin/named-checkconf`): Path to the
39+
configuration checker binary executed before launching `named`.
40+
41+
- **`NAMED_CHECKCONF_ARGS`** (default: empty): Arguments passed to
42+
`NAMED_CHECKCONF_BIN` in the entrypoint.
43+
44+
- **`ETC_RNDC_KEY`** (default: `/etc/rndc.key`): Location of the `rndc`
45+
configuration file. If not a symlink, it is moved to `NEW_RNDC_KEY`.
46+
47+
- **`NEW_RNDC_KEY`** (default: `/var/lib/named/rndc.key`): Target location where
48+
`ETC_RNDC_KEY` is moved if it is not a symlink. If `NEW_RNDC_KEY` does not
49+
exist, it is generated using `RNDC_BIN`.
50+
51+
- **`RNDC_BIN`** (default: `/usr/sbin/rndc`): Binary used to generate the `rndc`
52+
configuration file if it does not exist.
53+
54+
- **`RNDC_KEYSIZE`** (default: `512`): Key size passed to `RNDC_BIN` for
55+
generating the `rndc` configuration file.
56+
57+
58+
### Differences compared to the RPM Package
59+
60+
The container does not use `systemd` to manage
61+
`named`. Instead, `named` is launched directly by the container entrypoint in
62+
foreground mode, with logs output to `stdout`.
63+
64+
Moreover, environment variables from `/etc/sysconfig/named` are not sourced
65+
or used. You must set them explicitly using the container runtime,
66+
for example:
67+
68+
```ShellSession
69+
$ podman run --rm -d -e RNDC_KEYSIZE=1024 registry.suse.com/suse/bind:9
70+
```
71+
72+
## Additional Information
73+
74+
For more details on BIND and `named`, refer to the [official
75+
documentation](https://bind9.readthedocs.io/).
76+
77+
78+
## Licensing
79+
80+
`SPDX-License-Identifier: MIT`
81+
82+
This documentation and the build recipe are licensed as MIT.
83+
The container itself contains various software components under various open source licenses listed in the associated
84+
Software Bill of Materials (SBOM).
85+
86+
This image is a tech preview. Do not use it for production.
87+
Your feedback is welcome.
88+
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images).

β€Žbind-image/_serviceβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<services>
2+
<service mode="buildtime" name="docker_label_helper"/>
3+
<service mode="buildtime" name="kiwi_metainfo_helper"/>
4+
<service mode="buildtime" name="replace_using_package_version">
5+
<param name="file">Dockerfile</param>
6+
<param name="regex">%%bind_major_minor%%</param>
7+
<param name="package">bind</param>
8+
<param name="parse-version">minor</param>
9+
</service>
10+
<service mode="buildtime" name="replace_using_package_version">
11+
<param name="file">Dockerfile</param>
12+
<param name="regex">%%bind_major_minor_patch%%</param>
13+
<param name="package">bind</param>
14+
<param name="parse-version">patch</param>
15+
</service>
16+
</services>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-------------------------------------------------------------------
2+
Fri Mar 28 13:44:28 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
3+
4+
- First version of the ISC BIND 9 BCI

β€Žbind-image/entrypoint.shβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if [ $# -gt 0 ]; then
6+
# launched via entrypoint.sh foo bar => execute the args
7+
exec "$@"
8+
else
9+
# mimic what named.service does
10+
/usr/local/lib/bind/named.prep
11+
12+
exec /usr/sbin/named -u named -fg -c "${NAMED_CONF}" ${NAMED_ARGS:+ "$NAMED_ARGS"}
13+
fi

β€Žbind-image/healthcheck.shβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
dig @127.0.0.1 +short suse.com A|grep -E '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b'

0 commit comments

Comments
Β (0)