forked from openshift/ansible-service-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-localdev
34 lines (25 loc) · 1.13 KB
/
Dockerfile-localdev
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
FROM centos:7
MAINTAINER Ansible Service Broker Community
ENV USER_NAME=ansibleservicebroker \
USER_UID=1001 \
BASE_DIR=/opt/ansibleservicebroker
ENV HOME=${BASE_DIR}
RUN mkdir -p ${BASE_DIR} ${BASE_DIR}/etc \
&& useradd -u ${USER_UID} -r -g 0 -M -d ${BASE_DIR} -b ${BASE_DIR} -s /sbin/nologin -c "ansibleservicebroker user" ${USER_NAME} \
&& chown -R ${USER_NAME}:0 ${BASE_DIR} \
&& chmod -R g+rw ${BASE_DIR} /etc/passwd
RUN yum -y update \
&& yum -y install epel-release centos-release-openshift-origin \
&& yum -y install origin-clients net-tools bind-utils \
&& yum clean all
RUN mkdir /var/log/ansible-service-broker \
&& touch /var/log/ansible-service-broker/asb.log \
&& mkdir /etc/ansible-service-broker
COPY entrypoint.sh /usr/bin/
COPY broker /usr/bin/asbd
RUN chown -R ${USER_NAME}:0 /var/log/ansible-service-broker \
&& chown -R ${USER_NAME}:0 /etc/ansible-service-broker \
&& chmod -R g+rw /var/log/ansible-service-broker /etc/ansible-service-broker
USER ${USER_UID}
RUN sed "s@${USER_NAME}:x:${USER_UID}:@${USER_NAME}:x:\${USER_ID}:@g" /etc/passwd > ${BASE_DIR}/etc/passwd.template
ENTRYPOINT ["entrypoint.sh"]