added docker build file

This commit is contained in:
jblu 2023-05-16 12:38:40 -05:00
parent de9107db5f
commit b72bdeffd3
3 changed files with 13 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
*.toml
*docker_test*
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM python:alpine3.18
WORKDIR /
COPY apprise-client.py opt
ENV toml_path=''
RUN pip install requests
CMD [ "python", "opt/apprise-client.py" ]

View File

@ -1,7 +1,12 @@
import requests as r
from tomllib import load
import os
if os.environ["toml_path"]:
config_file_path=os.environ["toml_path"]
else:
config_file_path = './config.toml'
config_file_path = './config.toml'
with open(config_file_path, 'rb') as c:
config = load(c)