add basic bip

This commit is contained in:
Vincent Batts 2019-03-19 21:12:45 -04:00
parent 3c3c24c83b
commit 264531c268
Signed by: vbatts
GPG Key ID: E30EFAA812C6E5ED
2 changed files with 25 additions and 0 deletions

20
bip/Dockerfile Normal file
View File

@ -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"]

5
bip/runc.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
set -x
/usr/bin/bip -n -f "${BIPCONF}"