From f07bd2f27fdda635bb60ec2b2bce2bc16114204a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 14 Mar 2019 11:03:18 -0400 Subject: [PATCH] env variable for the config --- Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20d39f4..579f9e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]