2022-04-27 14:17:47 +02:00
# SPDX-License-Identifier: MIT
2022-11-23 10:32:25 +01:00
#!BuildTag: opensuse/bci/bci-init:%OS_VERSION_ID_SP%
#!BuildTag: opensuse/bci/bci-init:%OS_VERSION_ID_SP%.%RELEASE%
#!BuildTag: opensuse/bci/bci-init:latest
2022-04-27 14:17:47 +02:00
FROM opensuse/tumbleweed:latest
2022-07-18 16:05:58 +02:00
MAINTAINER openSUSE (https://www.opensuse.org/)
2022-04-27 14:17:47 +02:00
# Define labels according to https://en.opensuse.org/Building_derived_containers
2022-07-18 16:05:58 +02:00
# labelprefix=org.opensuse.bci.init
2022-11-23 10:32:25 +01:00
LABEL org.opencontainers.image.title= "openSUSE Tumbleweed BCI %OS_VERSION_NO_DASH% Init Container Image"
2022-04-27 14:17:47 +02:00
LABEL org.opencontainers.image.description= "Systemd environment for containers based on the SLE Base Container Image. This container is not supported when using container runtime other than podman."
LABEL org.opencontainers.image.version= "%OS_VERSION_ID_SP%.%RELEASE%"
2022-07-18 16:05:58 +02:00
LABEL org.opencontainers.image.url= "https://www.opensuse.org"
2022-04-27 14:17:47 +02:00
LABEL org.opencontainers.image.created= "%BUILDTIME%"
2022-07-18 16:05:58 +02:00
LABEL org.opencontainers.image.vendor= "openSUSE Project"
2023-03-03 08:51:07 +01:00
LABEL org.opencontainers.image.source= "%SOURCEURL%"
2023-05-04 15:20:18 +02:00
LABEL org.opensuse.reference= "registry.opensuse.org/opensuse/bci/bci-init:%OS_VERSION_ID_SP%.%RELEASE%"
2022-04-27 14:17:47 +02:00
LABEL org.openbuildservice.disturl= "%DISTURL%"
2022-07-18 16:05:58 +02:00
LABEL com.suse.release-stage= "released"
2022-04-27 14:17:47 +02:00
# endlabelprefix
LABEL usage = "This container should only be used to build containers for daemons. Add your packages and enable services using systemctl."
2022-05-04 09:54:10 +02:00
RUN set -euo pipefail; zypper -n in --no-recommends systemd gzip; zypper -n clean; rm -rf /var/log/*
2022-04-27 14:17:47 +02:00
CMD [ "/usr/lib/systemd/systemd" ]
2023-02-21 09:48:41 +01:00
RUN mkdir -p /etc/systemd/system.conf.d/ && \
printf "[Manager]\nLogColor=no" > \
/etc/systemd/system.conf.d/01-sle-bci-nocolor.conf
2022-11-23 10:32:25 +01:00
RUN systemctl disable getty@tty1.service
2023-02-21 09:48:41 +01:00
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD [ "/usr/bin/systemctl" , "is-active" , "multi-user.target" ]