commit
f9abd051a8
@ -0,0 +1,32 @@
|
|||||||
|
FROM python:3.7-slim-stretch
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y git && \
|
||||||
|
cd /usr/src/ && \
|
||||||
|
git clone https://github.com/n0mjs710/dmr_utils3 && \
|
||||||
|
cd /usr/src/dmr_utils3 && \
|
||||||
|
./install.sh && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf /usr/src/dmr_utils3 && \
|
||||||
|
git clone https://github.com/n0mjs710/hblink3
|
||||||
|
|
||||||
|
RUN cd /opt/hblink3/ && \
|
||||||
|
sed -i s/.*python.*//g requirements.txt && \
|
||||||
|
pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
ADD entrypoint /entrypoint
|
||||||
|
|
||||||
|
RUN adduser -u 54000 radio && \
|
||||||
|
adduser radio radio && \
|
||||||
|
chmod 755 /entrypoint && \
|
||||||
|
chown radio:radio /entrypoint && \
|
||||||
|
chown radio /opt/hblink3
|
||||||
|
|
||||||
|
RUN chmod 755 /entrypoint
|
||||||
|
|
||||||
|
USER radio
|
||||||
|
EXPOSE 54000
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/entrypoint" ]
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir -p /var/tmp/config
|
||||||
|
cd /var/tmp/config
|
||||||
|
git clone https://${GIT_USER}:${GIT_PASSWORD}@${GIT_REPO}
|
||||||
|
|
||||||
|
DIR=$(echo ${GIT_REPO}| sed s/.git$//g | sed s#^.*/##g)
|
||||||
|
|
||||||
|
cp -a /var/tmp/config/${DIR}/*cfg /opt/hblink3/
|
||||||
|
python /opt/hblink3/hblink.py
|
||||||
Loading…
Reference in new issue