diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6c402b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.9.10-alpine3.15 AS builder + +RUN apk add build-base + +COPY requirements.txt . + +RUN CFLAGS=-fcommon pip install -r requirements.txt + +FROM python:3.9.10-alpine3.15 + +COPY --from=builder /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/ + +WORKDIR /app + +COPY dht22_exporter.py . + +ENTRYPOINT [ "python", "-u", "dht22_exporter.py" ]