mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-16 21:45:39 +01:00
Added support for building official docker images. (#76)
This commit is contained in:
parent
83d8014a50
commit
17780ff194
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
src/ssh_audit/__pycache__/
|
||||||
|
src/ssh_audit.egg-info/
|
||||||
|
src/ssh_audit/*~
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM python:3.8-slim
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
COPY ssh-audit.py .
|
||||||
|
COPY src/ .
|
||||||
|
|
||||||
|
ENTRYPOINT ["python3", "/ssh-audit.py"]
|
||||||
|
|
||||||
|
EXPOSE 2222
|
13
Makefile.docker
Normal file
13
Makefile.docker
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
VERSION = $(shell grep VERSION src/ssh_audit/globals.py | grep -E -o "'(v.*)'" | tr -d "'")
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error "could not determine version!")
|
||||||
|
endif
|
||||||
|
|
||||||
|
all:
|
||||||
|
docker build -t positronsecurity/ssh-audit:${VERSION} .
|
||||||
|
docker tag positronsecurity/ssh-audit:${VERSION} positronsecurity/ssh-audit:latest
|
||||||
|
|
||||||
|
upload:
|
||||||
|
docker login
|
||||||
|
docker push positronsecurity/ssh-audit:${VERSION}
|
||||||
|
docker push positronsecurity/ssh-audit:latest
|
12
PACKAGING
12
PACKAGING
@ -45,3 +45,15 @@ As root, run:
|
|||||||
Leave all options default. Bump the version number in snapcraft.yaml. Then run:
|
Leave all options default. Bump the version number in snapcraft.yaml. Then run:
|
||||||
|
|
||||||
# make -f Makefile.snap
|
# make -f Makefile.snap
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
= Docker =
|
||||||
|
|
||||||
|
Build image with:
|
||||||
|
|
||||||
|
$ make -f Makefile.docker
|
||||||
|
|
||||||
|
Then upload them to Dockerhub with:
|
||||||
|
|
||||||
|
$ make -f Makefile.docker upload
|
||||||
|
@ -147,6 +147,12 @@ To install on Homebrew:
|
|||||||
$ brew install ssh-audit
|
$ brew install ssh-audit
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To install from Dockerhub:
|
||||||
|
```
|
||||||
|
$ docker pull positronsecurity/ssh-audit
|
||||||
|
```
|
||||||
|
(Then run with: `docker run -it -p 2222:2222 positronsecurity/ssh-audit 10.1.1.1`)
|
||||||
|
|
||||||
### Web Front-End
|
### Web Front-End
|
||||||
For convenience, a web front-end on top of the command-line tool is available at [https://www.ssh-audit.com/](https://www.ssh-audit.com/).
|
For convenience, a web front-end on top of the command-line tool is available at [https://www.ssh-audit.com/](https://www.ssh-audit.com/).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user