Merge pull request #2 from janolehuebner/dev

Fixed Dockerfile. Now using smaller base-image
This commit is contained in:
Jan-Ole Hübner 2023-09-02 20:32:11 +02:00 committed by GitHub
commit 7b8a3c26ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 20 deletions

View file

@ -22,7 +22,7 @@ jobs:
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
DOCKER_TAG="latest"
elif [ "${{ github.ref }}" == "refs/heads/dev" ]; then
DOCKER_TAG="dev"
DOCKER_TAG="development"
else
DOCKER_TAG="other"
fi

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
auth.env
.idea
notes

View file

@ -1,23 +1,9 @@
# Pull base image
#TODO better base image and structure
FROM ubuntu:22.04
FROM python:3.10-slim
# Labels
LABEL MAINTAINER="Øyvind Nilsen <oyvind.nilsen@gmail.com>"
LABEL MAINTAINER="Jan-Ole Hübner <huebner@jan-ole.de>"
# Setup external package-sources
RUN apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
gcc \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Run pip install
RUN pip install pytz --upgrade
RUN pip install tzdata --upgrade
ADD requirenments.txt /
RUN pip3 install -r /requirenments.txt
# Environment
@ -27,4 +13,4 @@ ADD pulse.py /
# Chmod
RUN chmod 755 /pulse.py
CMD ["/bin/python3","/pulse.py"]
CMD ["python3","/pulse.py"]

View file

@ -6,7 +6,7 @@ import time
from dateutil.parser import parse
print("tibberpulse-influxdb")
print("tibber_v001")
import tibber.const
import asyncio
import aiohttp