Merge pull request #2 from janolehuebner/dev
Fixed Dockerfile. Now using smaller base-image
This commit is contained in:
commit
7b8a3c26ab
4 changed files with 7 additions and 20 deletions
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
||||||
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
||||||
DOCKER_TAG="latest"
|
DOCKER_TAG="latest"
|
||||||
elif [ "${{ github.ref }}" == "refs/heads/dev" ]; then
|
elif [ "${{ github.ref }}" == "refs/heads/dev" ]; then
|
||||||
DOCKER_TAG="dev"
|
DOCKER_TAG="development"
|
||||||
else
|
else
|
||||||
DOCKER_TAG="other"
|
DOCKER_TAG="other"
|
||||||
fi
|
fi
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
auth.env
|
auth.env
|
||||||
.idea
|
.idea
|
||||||
|
notes
|
20
Dockerfile
20
Dockerfile
|
@ -1,23 +1,9 @@
|
||||||
# Pull base image
|
FROM python:3.10-slim
|
||||||
#TODO better base image and structure
|
|
||||||
FROM ubuntu:22.04
|
|
||||||
|
|
||||||
# Labels
|
# 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 /
|
ADD requirenments.txt /
|
||||||
RUN pip3 install -r /requirenments.txt
|
RUN pip3 install -r /requirenments.txt
|
||||||
# Environment
|
# Environment
|
||||||
|
@ -27,4 +13,4 @@ ADD pulse.py /
|
||||||
# Chmod
|
# Chmod
|
||||||
RUN chmod 755 /pulse.py
|
RUN chmod 755 /pulse.py
|
||||||
|
|
||||||
CMD ["/bin/python3","/pulse.py"]
|
CMD ["python3","/pulse.py"]
|
2
pulse.py
2
pulse.py
|
@ -6,7 +6,7 @@ import time
|
||||||
from dateutil.parser import parse
|
from dateutil.parser import parse
|
||||||
|
|
||||||
|
|
||||||
print("tibberpulse-influxdb")
|
print("tibber_v001")
|
||||||
import tibber.const
|
import tibber.const
|
||||||
import asyncio
|
import asyncio
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue