Skip to content

Commit

Permalink
Added support for building official docker images. (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtesta committed Oct 20, 2020
1 parent 83d8014 commit 17780ff
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
@@ -0,0 +1,3 @@
src/ssh_audit/__pycache__/
src/ssh_audit.egg-info/
src/ssh_audit/*~
10 changes: 10 additions & 0 deletions Dockerfile
@@ -0,0 +1,10 @@
FROM python:3.8-slim

WORKDIR /

COPY ssh-audit.py .
COPY src/ .

ENTRYPOINT ["python3", "/ssh-audit.py"]

EXPOSE 2222
13 changes: 13 additions & 0 deletions Makefile.docker
@@ -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 changes: 12 additions & 0 deletions PACKAGING
Expand Up @@ -45,3 +45,15 @@ As root, run:
Leave all options default. Bump the version number in snapcraft.yaml. Then run:

# make -f Makefile.snap

----

= Docker =

Build image with:

$ make -f Makefile.docker

Then upload them to Dockerhub with:

$ make -f Makefile.docker upload
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -147,6 +147,12 @@ To install on Homebrew:
$ 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
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/).

Expand Down

0 comments on commit 17780ff

Please sign in to comment.