-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
45 lines (43 loc) · 1.71 KB
/
Dockerfile
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
FROM centos:7 as ipxe-builder
ENV IPXE_MASTER_SNAPSHOT=https://git.ipxe.org/ipxe.git/snapshot/master.tar.gz
RUN yum -y install gcc xz-devel make perl
RUN mkdir /tmp/ipxe
RUN curl -f ${IPXE_MASTER_SNAPSHOT} -o /tmp/ipxe/master.tar.gz
RUN tar --strip-components=1 -xzf /tmp/ipxe/master.tar.gz -C /tmp/ipxe
WORKDIR /tmp/ipxe/src
COPY ipxescript /tmp/ipxe/src/
RUN make configure
RUN make bin/undionly.kpxe bin-x86_64-efi/ipxe.efi EMBED=/tmp/ipxe/src/ipxescript
FROM centos:7
ENV OPENSTACK_RELEASE=train
RUN groupadd -g 997 ironic && useradd -u 998 -d /var/lib/ironic -s /sbin/nologin -M -g ironic ironic
RUN yum -y install centos-release-openstack-${OPENSTACK_RELEASE} && \
yum -y install epel-release && \
yum -y upgrade && \
yum -y install git \
httpd \
ipxe-bootimgs \
mariadb \
mod_wsgi \
less \
openstack-keystone \
openstack-ironic-api \
openstack-ironic-conductor \
patch \
python-crypto \
python-ironicclient \
python2-openstackclient.noarch \
python2-PyMySQL \
python2-rsa \
rsyslog \
qemu-img \
syslinux \
tftp-server \
wget &&\
mv /etc/ironic/rootwrap.d /etc/rootwrap.d-ironic && \
mkdir /tmp/patches
COPY --from=ipxe-builder /tmp/ipxe/src/bin-x86_64-efi/ipxe.efi /usr/share/syslinux/custom-ipxe.efi
COPY --from=ipxe-builder /tmp/ipxe/src/bin/undionly.kpxe /usr/share/syslinux/custom-undionly.kpxe
COPY rsyslog.conf /etc/
VOLUME /etc/ironic
USER ironic:ironic