switched Docker base image to alpine3.5

This commit is contained in:
Nat Morris
2017-02-20 00:56:37 +00:00
parent 629f5cf88b
commit bc5cc43530

View File

@@ -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"]