move Docker build args down to use layer caching

This commit is contained in:
Henning Jacobs
2017-01-14 17:58:54 +01:00
parent 43bf0040cb
commit d63b383f44

View File

@@ -1,8 +1,6 @@
FROM alpine:3.5 FROM alpine:3.5
MAINTAINER Henning Jacobs <henning@jacobs1.de> MAINTAINER Henning Jacobs <henning@jacobs1.de>
ARG VERSION=latest
EXPOSE 8080 EXPOSE 8080
RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates && \ RUN apk add --no-cache python3 python3-dev gcc musl-dev zlib-dev libffi-dev openssl-dev ca-certificates && \
@@ -18,6 +16,8 @@ COPY requirements.txt /
RUN pip3 install -r /requirements.txt RUN pip3 install -r /requirements.txt
COPY kube_ops_view /kube_ops_view COPY kube_ops_view /kube_ops_view
ARG VERSION=dev
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /kube_ops_view/__init__.py RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /kube_ops_view/__init__.py
WORKDIR / WORKDIR /