File Dockerfile of Package bind-container

# SPDX-License-Identifier: MIT
# Defines the tag for OBS and build script builds:
#!BuildTag: suse/alp/workloads/bind:%%bind_version%%
#!BuildTag: suse/alp/workloads/bind:%%bind_version%%-%RELEASE%
#!BuildTag: suse/alp/workloads/bind:latest
FROM opensuse/tumbleweed:latest

LABEL Description="Bind DNS Server Container"
LABEL maintainer="Jorik Cronenberg <jcronenberg@suse.de>"

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.alp.workloads.bind
LABEL org.opencontainers.image.title="Bind DNS Server Container"
LABEL org.opencontainers.image.description="Container for a Bind DNS Server"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.version="%%bind_version"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.reference="registry.opensuse.org/suse/alp/workloads/tumbleweed_containerfiles/suse/alp/workloads/bind:%%bind_version%%-%RELEASE%"
# endlabelprefix

RUN zypper --non-interactive install --no-recommends bind

COPY entrypoint.sh /entrypoint.sh
RUN mkdir -p /container
COPY label-* \
     *.service \
     rndc \
     /container
RUN chmod +x /container/label-* /container/rndc /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

LABEL INSTALL="podman run --rm --privileged --name bind-install -v /:/host \${IMAGE} /container/label-install"
LABEL UNINSTALL="podman run --rm --privileged --name bind-uninstall -v /:/host \${IMAGE} /container/label-uninstall"
LABEL RUN="podman run --privileged --replace --name bind -p 53:53/tcp -p 53:53/udp -p 127.0.0.1:953:953/tcp -v /etc:/host/etc -v /var/lib/named:/var/lib/named \${IMAGE} /usr/sbin/named -g -u named"
openSUSE Build Service is sponsored by