From e854d92eef2872c02631e55c7b8a05699f5f3324 Mon Sep 17 00:00:00 2001 From: Michael Cherny Date: Sun, 23 Dec 2018 14:47:22 +0200 Subject: [PATCH] Make rebuilding kube-hunter image after code changes quick Somewhat dirty (perhaps there is a better multi-stage build solution). First copy requirements.txt only and install all dependencies. Then copy all kube-hunter new code. This way only latest layer changing on code changes and all previous can be brought from cache. --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b0e5a2..8bbc3fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,10 @@ RUN apk add --update \ wireshark RUN mkdir -p /kube-hunter +COPY ./requirements.txt /kube-hunter/. +RUN pip install -r /kube-hunter/requirements.txt + COPY . /kube-hunter WORKDIR /kube-hunter -RUN pip install -r requirements.txt ENTRYPOINT ["python", "kube-hunter.py"]