diff --git a/bip/Dockerfile b/bip/Dockerfile new file mode 100644 index 0000000..5149942 --- /dev/null +++ b/bip/Dockerfile @@ -0,0 +1,20 @@ +FROM fedora + +RUN dnf update -y --refresh && \ + dnf install -y bip && \ + dnf clean all +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 + +RUN mkdir -p /data && chown -R bip:bip /data +COPY run.sh /run.sh +USER bip +VOLUME ["/data"] +EXPOSE 7778 +ENV HOME=/data +ENV BIPCONF=/etc/bip.conf + +CMD ["/bin/sh", "/run.sh"] diff --git a/bip/runc.sh b/bip/runc.sh new file mode 100755 index 0000000..228a41a --- /dev/null +++ b/bip/runc.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +set -x + +/usr/bin/bip -n -f "${BIPCONF}"