mirror of
https://github.com/nikdoof/aaisp2mqtt.git
synced 2025-12-22 23:29:21 +00:00
Switch to Python 3.8 Alpine image as base
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,20 +1,9 @@
|
||||
FROM alpine:3.6
|
||||
MAINTAINER Nat Morris <nat@nuqe.net>
|
||||
FROM python:3.8-alpine
|
||||
|
||||
COPY requirements.txt /app/
|
||||
COPY aaisp-to-mqtt.py /app/
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache \
|
||||
python \
|
||||
ca-certificates \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
py-pip \
|
||||
&& pip install -r requirements.txt \
|
||||
&& apk del --no-cache .build-deps \
|
||||
&& addgroup -g 1000 aaisp \
|
||||
&& adduser -u 1000 -G aaisp -s /bin/sh -D aaisp \
|
||||
&& chown aaisp:aaisp -R /app \
|
||||
&& echo "0 * * * * /usr/bin/python /app/aaisp-to-mqtt.py /app/config.cfg" | crontab -u aaisp -
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
CMD ["/usr/sbin/crond", "-f", "-d", "8"]
|
||||
CMD ["/usr/bin/python", "/app/aaisp-to-mqtt.py"]
|
||||
|
||||
Reference in New Issue
Block a user