-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
31 lines (21 loc) · 1.11 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
FROM apache/nifi-registry
# git user and personal access token
ARG user
ARG token
USER root
# install git
RUN apt update \
&& apt-get upgrade -y \
&& apt install -y git
RUN git clone https://${token}@github.com/msk-mind/nifi-flow.git /opt/nifi-registry/nifi-registry-current/nifi-flow
RUN chown -R nifi:nifi /opt/nifi-registry/nifi-registry-current/
COPY conf/providers.xml /opt/nifi-registry/nifi-registry-current/conf/
# modify providers.xml with user, token
RUN sed -i.bak "s/<property name=\"Remote Access User\"><\/property>/<property name=\"Remote Access User\">${user}<\/property>/g" /opt/nifi-registry/nifi-registry-current/conf/providers.xml \
&& sed -i.bak "s/<property name=\"Remote Access Password\"><\/property>/<property name=\"Remote Access Password\">${token}<\/property>/g" /opt/nifi-registry/nifi-registry-current/conf/providers.xml \
&& rm /opt/nifi-registry/nifi-registry-current/conf/providers.xml.bak
# change permission for openshift
RUN chgrp -R 0 /opt/nifi-registry/nifi-registry-current && \
chmod -R g=u /opt/nifi-registry/nifi-registry-current
USER nifi
ENTRYPOINT ["../scripts/start.sh"]