File Dockerfile of Package container-heroes-salt-testing-systemd

#!BuildTag: heroes-salt-testing-systemd:latest
FROM heroes-salt-testing:latest

LABEL org.opencontainers.image.authors="admin@opensuse.org"
LABEL org.opencontainers.image.title="openSUSE Infrastructure Salt Testing"
LABEL org.opencontainers.image.description="Container for performing SaltStack related CI tests in the openSUSE infrastructure"

COPY init-hack.service /etc/systemd/system/
COPY entrypoint.sh /usr/local/sbin/

# additional packages needed for test_highstate.sh to succeed (second line of zypper in command):
# - apache2 to mock HTTP services
# - apache2-utils for a2enmod and apachectl
# - acl for acl.* states
# - cronie for /usr/bin/crontab (needed by salt to read existing crontab)
# - dehydrated to provide the dehydrated user and group
# - elasticsearch to provide the elasticsearch user and group
# - haproxy to provide the haproxy user and group
# - kmod for kmod.present in the ha role
# - mariadb for mysql-related states
# - openssh-clients to provide ssh for ssh.host_keys
# - pdns-genrev for /etc/sysconfig/pdns-genrev in nameserver.primary
# - pdns to provide the pdns user and group
# - pdns-backend-sqlite3 to provide /usr/share/doc/packages/pdns/schema.sqlite3.sql for nameserver.secondary (this one requires excludedocs=no)
# - pgbouncer to provide the pgbouncer user and group
# - podman and python3-podman for states using the podman formula
# - postgresql-server to provide the postgres user and group
# - postsrsd/postgrey to provide their sysconfig files
# - python3-ldap for the ldap3 module to load
# - python3-python-dateutil for states using dateutil / profile.vpn.openvpn.ccd
# - python3-PyMySQL for the mysql module to load
# - python3-toml for states using the TOML serializer
# - redis for the redis user and group
# - sqlite3 to apply the PowerDNS database schema for nameserver.secondary
# - system-group-wheel for vpn.gateway
# - system-user-mail to avoid warnings about the mail group not existing while creating more users
# - system-user-wwwrun for the wiki
# - kudos to provide kudos user and group

RUN set -eu ; \
	sed -Ei 's/^(rpm.install.excludedocs =) yes/\1 no/' /etc/zypp/zypp.conf ; \
	zypper -n ar https://download.opensuse.org/repositories/openSUSE:/infrastructure:/wiki/16.0/openSUSE:infrastructure:wiki.repo openSUSE:infrastructure:wiki ; \
	zypper -n ar https://download.opensuse.org/repositories/openSUSE:/infrastructure:/kudos/16.0/openSUSE:infrastructure:kudos.repo openSUSE:infrastructure:kudos ; \
	zypper -n in --no-recommends salt-master salt-minion systemd \
		apache2 apache2-utils acl \
		cronie \
		dehydrated \
		elasticsearch \
		haproxy \
		kmod \
		kudos \
		mariadb \
		openssh-clients \
		pdns pdns-backend-sqlite3 pdns-genrev \
		pgbouncer postgresql-server \
		podman python3-podman \
		postgrey postsrsd \
		python3-ldap python3-python-dateutil python3-PyMySQL python3-toml \
		redis \
		sqlite3 \
		system-group-wheel system-user-mail system-user-wwwrun \
		; \
	zypper -n rr -a ; \
	zypper -n clean -a ; \
	chmod +x /usr/local/sbin/entrypoint.sh ; \
	systemctl enable init-hack ; \
	rm /usr/lib/systemd/system/multi-user.target.wants/getty.target ; \
	rm -r /var/log/*

ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
openSUSE Build Service is sponsored by