-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Dockerfile build The Docker build used a 2-step installation of requirements and application. This was broken by #272. Fixes #300 * Add dependencies cache for docker build Caching installation requirements saves time when building
- Loading branch information
Showing
5 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.png | ||
tests/ | ||
docs/ | ||
.github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
*.pyc | ||
.venv | ||
.dockerignore | ||
*aqua* | ||
venv/ | ||
.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
FROM python:3.7-alpine3.10 as builder | ||
FROM python:3.8-alpine as builder | ||
|
||
RUN apk add --no-cache \ | ||
linux-headers \ | ||
tcpdump \ | ||
build-base \ | ||
ebtables | ||
ebtables \ | ||
make \ | ||
git && \ | ||
apk upgrade --no-cache | ||
|
||
WORKDIR /kube-hunter | ||
COPY ./requirements.txt /kube-hunter/. | ||
RUN pip install -r /kube-hunter/requirements.txt -t /kube-hunter | ||
COPY setup.py setup.cfg Makefile ./ | ||
RUN make deps | ||
|
||
COPY . /kube-hunter | ||
COPY . . | ||
RUN make install | ||
|
||
FROM python:3.7-alpine3.10 | ||
|
||
RUN apk add --no-cache \ | ||
tcpdump | ||
RUN apk upgrade --no-cache | ||
|
||
COPY --from=builder /kube-hunter /kube-hunter | ||
|
||
WORKDIR /kube-hunter | ||
|
||
ENTRYPOINT ["python", "kube-hunter.py"] | ||
ENTRYPOINT ["kube-hunter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters