mirror of
https://github.com/nikdoof/aaisp2mqtt.git
synced 2025-12-19 21:59:21 +00:00
switched Docker base image to alpine3.5
This commit is contained in:
34
Dockerfile
34
Dockerfile
@@ -1,11 +1,29 @@
|
||||
FROM phusion/baseimage:0.9.19
|
||||
MAINTAINER Nat Morris "nat@nuqe.net"
|
||||
FROM alpine:3.5
|
||||
MAINTAINER Nat Morris <nat@nuqe.net>
|
||||
|
||||
COPY aaisp-to-mqtt.py /usr/local/bin/aaisp-to-mqtt.py
|
||||
RUN apk add --update \
|
||||
python \
|
||||
python-dev \
|
||||
py-pip \
|
||||
build-base \
|
||||
&& pip install virtualenv
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y python-pip python-dev libffi-dev libssl-dev
|
||||
ADD requirements.txt /tmp
|
||||
RUN pip install --upgrade -r /tmp/requirements.txt
|
||||
#ENV LIBRARY_PATH=/lib:/usr/lib
|
||||
#RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
# Copy requirements before app so we can cache PIP dependencies on their own
|
||||
RUN mkdir /app
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
WORKDIR /app
|
||||
RUN virtualenv /env && /env/bin/pip install -r /app/requirements.txt
|
||||
|
||||
COPY aaisp-to-mqtt.py /app/
|
||||
|
||||
RUN rm -rf \
|
||||
/root/.cache \
|
||||
/tmp/*
|
||||
RUN rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
|
||||
CMD ["/env/bin/python", "/app/aaisp-to-mqtt.py", "-c /config/config.cfg"]
|
||||
|
||||
Reference in New Issue
Block a user