forked from sullo/nikto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sullo#811 from HuntClauss/fix/docker
refactor: reorder docker instructions to benefit from caching
- Loading branch information
Showing
1 changed file
with
12 additions
and
16 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 |
---|---|---|
@@ -1,27 +1,23 @@ | ||
FROM alpine:3.12 | ||
|
||
LABEL version="2.1.6" \ | ||
LABEL version="2.5.0" \ | ||
author="Author Paul Sec (https://github.com/PaulSec), Nikto User https://github.com/drwetter" \ | ||
docker_build="docker build -t sullo/nikto:2.1.6 ." \ | ||
docker_run_basic="docker run --rm sullo/nikto:2.1.6 -h http://www.example.com" \ | ||
docker_run_advanced="docker run --rm -v $(pwd):/tmp sullo/nikto:2.1.6 -h http://www.example.com -o /tmp/out.json" | ||
docker_build="docker build -t sullo/nikto:2.5.0 ." \ | ||
docker_run_basic="docker run --rm sullo/nikto:2.5.0 -h http://www.example.com" \ | ||
docker_run_advanced="docker run --rm -v $(pwd):/tmp sullo/nikto:2.5.0 -h http://www.example.com -o /tmp/out.json" | ||
|
||
COPY ["program/", "/nikto"] | ||
|
||
ENV PATH=${PATH}:/nikto | ||
|
||
RUN echo 'Installing packages for Nikto.' \ | ||
&& apk add --update --no-cache --virtual .build-deps \ | ||
RUN echo 'Installing packages for Nikto.' | ||
RUN apk add --update --no-cache --virtual .build-deps \ | ||
perl \ | ||
perl-net-ssleay \ | ||
&& echo 'Creating the nikto group.' \ | ||
perl-net-ssleay | ||
|
||
RUN echo 'Creating the nikto group.' \ | ||
&& addgroup nikto \ | ||
&& echo 'Creating the nikto user.' \ | ||
&& adduser -G nikto -g "Nikto user" -s /bin/sh -D nikto \ | ||
&& echo 'Changing the ownership.' \ | ||
&& chown -R nikto.nikto /nikto \ | ||
&& echo 'Finishing image.' | ||
&& adduser -G nikto -g "Nikto user" -s /bin/sh -HD nikto | ||
|
||
ENV PATH=${PATH}:/opt/nikto | ||
USER nikto | ||
|
||
COPY --chown=nikto:nikto ["program/", "/opt/nikto"] | ||
ENTRYPOINT ["nikto.pl"] |