env variable for the config

This commit is contained in:
Vincent Batts 2019-03-14 11:03:18 -04:00
parent b5e8e23274
commit f07bd2f27f

View file

@ -11,11 +11,17 @@ LABEL com.hashbangbash.image.digest=${DIGEST}
RUN dnf update -y --refresh && \
dnf install -y bip && \
dnf clean all
RUN sed -i 's/^#ip/ip/' /etc/bip.conf && \
sed -i 's/^#port/port/' /etc/bip.conf
RUN mkdir -p /bip && \
sed -i 's/^#ip/ip/' /etc/bip.conf && \
sed -i 's/^#port/port/' /etc/bip.conf && \
sed -i 's|^log_root.*$|log_root = "/bip/logs";|' /etc/bip.conf && \
sed -i 's|^pid_file.*$|pid_file="/bip/bip.pid";|' /etc/bip.conf
VOLUME ["/var/run/bip"]
RUN chown -R bip:bip /data
USER bip
VOLUME ["/data"]
EXPOSE 7778
ENV HOME=/var/run/bip
CMD ["/usr/bin/bip", "-n", "-f", "/etc/bip.conf"]
ENV HOME=/data
ENV BIPCONF=/etc/bip.conf
CMD ["/usr/bin/bip", "-n", "-f", "$BIPCONF"]