Refactor docker file and remove cache to clean up packages after
This commit is contained in:
@@ -14,14 +14,20 @@ LABEL org.label-schema.vendor="Evan Richardson"
|
||||
LABEL org.label-schema.docker.cmd="docker run --name=py-eagle-mqtt -e MQTT_BROKER_IP=<IP> -e MQTT_BROKER_PORT=1883 -p 22042:22042 -d evanrich/py-eagle-mqtt"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app
|
||||
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
|
||||
|
||||
ENV PYTHONPATH=/app/src/python
|
||||
RUN apk --update add --no-cache logrotate \
|
||||
&& apk upgrade \
|
||||
&& pip3 install --no-cache-dir --upgrade pip \
|
||||
&& pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
RUN apk --update add --no-cache logrotate && \
|
||||
apk upgrade && \
|
||||
pip3 install --no-cache-dir --upgrade pip && \
|
||||
pip3 install --no-cache-dir -r requirements.txt && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY . /app
|
||||
|
||||
CMD ["/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]
|
||||
|
||||
EXPOSE 22042
|
||||
|
||||
Reference in New Issue
Block a user