This repository was archived by the owner on May 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (60 loc) · 3.06 KB
/
Dockerfile
File metadata and controls
69 lines (60 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM docker.io/centos:7
MAINTAINER RayfordJ <rjohnson@redhat.com>
ENV LANG=en_US.utf8 \
container=oci
EXPOSE 53 67 68 69 80 443 3000 3306 5910-5930 5432 8140 8443
### Atomic/OpenShift Labels - https://github.com/projectatomic/ContainerApplicationGenericLabels
LABEL name="RHsyseng/foreman" \
vendor="Acme Corp" \
version="0.1" \
release="1" \
summary="Acme Corp's Foreman/Katello app" \
description="Foreman/Katello app will do ....." \
### Required labels above - recommended below
url="https://www.acme.io"
# Script to relocate to volume post-installation completion
COPY relocate-foreman.sh /root/relocate-foreman.sh
RUN chmod 0755 /root/relocate-foreman.sh
RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical --setopt=tsflags=nodocs && \
yum -y install epel-release centos-release-scl && \
yum -y install https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm && \
# yum -y install https://yum.theforeman.org/releases/latest/el7/x86_64/foreman-release.rpm && \
yum -y install http://yum.theforeman.org/releases/1.15/el7/x86_64/foreman-release.rpm && \
yum -y install http://fedorapeople.org/groups/katello/releases/yum/3.4/katello/el7/x86_64/katello-repos-latest.rpm && \
## katello/foreman installer packages
yum -y install --setopt=tsflags=nodocs \
puppet-agent \
foreman \
foreman-cli \
foreman-debug \
foreman-installer \
foreman-libvirt \
foreman-ovirt \
foreman-postgresql \
foreman-proxy \
foreman-selinux \
katello \
tfm-rubygem-foreman_dhcp_browser \
rubygem-smart_proxy_discovery \
tfm-rubygem-foreman_discovery \
tfm-rubygem-foreman_remote_execution \
rubygem-smart_proxy_remote_execution_ssh && \
# VERSION is missing even though sclo-ror42 package claims it...
# `foreman-installer` fails without its existence...
mkdir -p /opt/rh/sclo-ror42/root/usr/share/gems/gems/mail-2.6.1 && \
touch /opt/rh/sclo-ror42/root/usr/share/gems/gems/mail-2.6.1/VERSION && \
# package name change in centos base
## /usr/share/foreman-installer/modules/foreman_proxy/manifests/tftp.pp
sed -i.orig -e "s/'grub2-efi'/'grub2-efi-x64'/" -e "s/'grub2-efi-modules'/'grub2-efi-x64-modules'/" -e "s/'shim'/'shim-x64'/" /usr/share/foreman-installer/modules/foreman_proxy/manifests/tftp.pp && \
# Foreman Discovery Image - latest
mkdir -p /var/foreman-vol/var/lib/tftpboot/boot && \
wget http://downloads.theforeman.org/discovery/releases/3.0/fdi-image-latest.tar -O - | tar x --overwrite -C /var/foreman-vol/var/lib/tftpboot/boot && \
yum clean all
STOPSIGNAL SIGRTMIN+3
RUN MASK_JOBS="sys-fs-fuse-connections.mount getty.target systemd-initctl.socket ipmievd.service" && \
systemctl mask ${MASK_JOBS} && \
for i in ${MASK_JOBS}; do find /usr/lib/systemd/ -iname $i | grep ".wants" | xargs rm -f; done && \
rm -f /etc/fstab && \
systemctl set-default multi-user.target
# RUN foreman-installer --scenario katello # --foreman-admin-password "${ADMINPASSWORD}"
CMD [ "/sbin/init" ]