diff --git a/Dockerfile b/Dockerfile index 53ced7b..ac79a22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,36 @@ -FROM python:alpine3.18 +############################################################################### +# Copyright (C) 2024 Shane aka, ShaYmez +# +# 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" ] \ No newline at end of file diff --git a/entrypoint b/entrypoint index 387faf4..1e4b156 100644 --- a/entrypoint +++ b/entrypoint @@ -1,2 +1,5 @@ -cd /opt/HBMonv2 -python /opt/HBMonv2/monitor.py +#!/bin/sh + +echo 'Starting HBMonv2...' +cd /hbmon +python /hbmon/monitor.py diff --git a/requirements.txt b/requirements.txt index c184744..74d1dd2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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