forked from openshift/hive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
39 lines (32 loc) · 1.59 KB
/
Dockerfile.dev
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
#FROM registry.access.redhat.com/ubi7/ubi
FROM openshift/origin-release:golang-1.13
# ssh-agent required for gathering logs in some situations:
RUN if ! rpm -q openssh-clients; then yum install -y openssh-clients && yum clean all && rm -rf /var/cache/yum/*; fi
#
# libvirt libraries required for running bare metal installer.
RUN yum install -y libvirt-devel && yum clean all && rm -rf /var/cache/yum/*
ADD bin/hiveadmission /opt/services/
ADD bin/operator /opt/services/hive-operator
ADD bin/manager /opt/services/
ADD bin/hiveutil /usr/bin/
ADD bin/hive-apiserver /opt/services
# Hacks to allow writing known_hosts, homedir is / by default in OpenShift.
# Bare metal installs need to write to $HOME/.cache, and $HOME/.ssh for as long as
# we're hitting libvirt over ssh. OpenShift will not let you write these directories
# by default so we must setup some permissions here.
ENV HOME /home/hive
RUN mkdir -p /home/hive && \
chgrp -R 0 /home/hive && \
chmod -R g=u /home/hive
# This is so that we can write source certificate anchors during container start up.
RUN mkdir -p /etc/pki/ca-trust/source/anchors && \
chgrp -R 0 /etc/pki/ca-trust/source/anchors && \
chmod -R g=u /etc/pki/ca-trust/source/anchors
# This is so that we can run update-ca-trust during container start up.
RUN mkdir -p /etc/pki/ca-trust/extracted/openssl && \
mkdir -p /etc/pki/ca-trust/extracted/pem && \
mkdir -p /etc/pki/ca-trust/extracted/java && \
chgrp -R 0 /etc/pki/ca-trust/extracted && \
chmod -R g=u /etc/pki/ca-trust/extracted
# TODO: should this be the operator?
ENTRYPOINT ["/opt/services/manager"]