update dockerfile and requirements

This commit is contained in:
Shane Daley 2024-02-26 20:13:46 +00:00
parent fbedd25e73
commit 4234de0aa0
3 changed files with 40 additions and 18 deletions

View File

@ -1,19 +1,36 @@
FROM python:alpine3.18
###############################################################################
# Copyright (C) 2024 Shane aka, ShaYmez <support@gb7nr.co.uk>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
###############################################################################
COPY entrypoint-proxy /entrypoint
FROM python:alpine3.17
RUN adduser -D -u 54001 hbmon && \
apk update && \
apk add git gcc musl-dev libffi-dev libssl-dev cargo && \
pip install --upgrade pip && \
pip cache purge && \
cd /opt && \
git clone https://github.com/ShaYmez/HBMonv2.git && \
cd /opt/HBmonv2 && \
pip install --no-cache-dir -r requirements.txt && \
apk del git gcc musl-dev && \
chown -R radio: /opt/HBMonv2
COPY entrypoint /entrypoint
USER hbmon
RUN adduser -D -u 54000 radio
RUN apk update && \
apk add git gcc musl-dev libffi-dev openssl-dev cargo && \
pip install --upgrade pip && \
pip cache purge && \
git clone https://github.com/shaymez/HBMonv2.git /hbmon && \
cd /hbmon && \
pip install --no-cache-dir -r requirements.txt && \
apk del git gcc musl-dev && \
chown -R radio /hbmon
ENTRYPOINT [ "/entrypoint" ]
USER radio
ENTRYPOINT [ "/entrypoint" ]

View File

@ -1,2 +1,5 @@
cd /opt/HBMonv2
python /opt/HBMonv2/monitor.py
#!/bin/sh
echo 'Starting HBMonv2...'
cd /hbmon
python /hbmon/monitor.py

View File

@ -3,4 +3,6 @@ dmr_utils3
bitstring
autobahn
jinja2==2.11.3
markupsafe==2.0.1
MarkupSafe==2.0.1
pyOpenSSL==23.1.1
service-identity==21.1.0