#90 build app.js outside of main Docker image

This commit is contained in:
Henning Jacobs
2017-01-14 15:45:26 +01:00
parent c9d0bdb1fb
commit 05fca4a089
8 changed files with 116 additions and 17 deletions

View File

@@ -1,22 +1,21 @@
FROM alpine:3.4
FROM alpine:3.5
MAINTAINER Henning Jacobs <henning@jacobs1.de>
RUN apk add --no-cache python3 python3-dev alpine-sdk zlib-dev libffi-dev openssl-dev nodejs ca-certificates && \
EXPOSE 8080
RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools gevent && \
apk del python3-dev alpine-sdk zlib-dev libffi-dev openssl-dev && \
apk del python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev && \
rm -rf /var/cache/apk/* /root/.cache /tmp/*
EXPOSE 8080
COPY scm-source.json /
COPY requirements.txt /
RUN pip3 install -r /requirements.txt
COPY kube_ops_view /
COPY app /app
WORKDIR /app
RUN npm install && npm run build
COPY kube_ops_view /kube_ops_view
WORKDIR /
ENTRYPOINT ["/usr/bin/python3", "-m", "kube_ops_view"]