aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Yousuf <aly.yousuf7@gmail.com>2017-03-22 13:06:13 +0500
committerAli Yousuf <aly.yousuf7@gmail.com>2017-03-22 13:06:13 +0500
commit5766a70297e7da19022894176221cdf0a636be42 (patch)
tree3994769af607e7444e88c709ef03ae5cbc6c8f53
parentb8eeb4a403ce6bcf2fd821d0b22b5739424b971c (diff)
downloadsshtron-5766a70297e7da19022894176221cdf0a636be42.tar.gz
Add Dockerfile
-rw-r--r--.dockerignore2
-rw-r--r--Dockerfile15
-rw-r--r--README.md12
3 files changed, 29 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..afb3206
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+# Ignore the already generated RSA key-pair
+id_rsa*
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..93bbe2c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,15 @@
+FROM golang:latest
+
+ENV PROJECT_NAME sshtron
+ENV PROJECT_PATH github.com/zachlatta/sshtron
+
+ADD . $GOPATH/src/$PROJECT_PATH
+WORKDIR $GOPATH/src/$PROJECT_PATH
+
+RUN apt-get update && apt-get install openssh-client && \
+ ssh-keygen -t rsa -N "" -f id_rsa && \
+ go get && go install && \
+ rm -rf /var/lib/apt/lists/*
+
+ENTRYPOINT sshtron
+
diff --git a/README.md b/README.md
index 26e130a..d048c92 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,18 @@ $ go get && go build
$ ./sshtron
```
+## Running under a Docker container
+
+Clone the project and `cd` into its directory.
+
+```sh
+# Build the sshtron Docker image
+$ docker build -t sshtron .
+
+# Spin up the container with always-restart policy
+$ docker run -t -d -p 2022:2022 --restart always --name sshtron sshtron
+```
+
## CVE-2016-0777
[CVE-2016-0777](https://www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-0778/openssh-cve-2016-0777-cve-2016-0778.txt)
Un proyecto texto-plano.xyz