Add Dockerfile.

This commit is contained in:
NI
2019-08-10 15:26:04 +08:00
parent 8a9a483dd6
commit 6b524593b6
2 changed files with 78 additions and 0 deletions

View File

@@ -33,6 +33,23 @@ $ docker run --detach \
niruix/sshwifty:latest
```
If you want to use TLS (HTTPS) with the Docker image and don't want to setup
volumes, you can use `SSHWIFTY_DOCKER_TLSCERT` and `SSHWIFTY_DOCKER_TLSCERTKEY`
environment variables when starting the container:
```
$ docker run --detach \
--restart=always \
--publish 8182:8182 \
--env SSHWIFTY_DOCKER_TLSCERT="$(cat /path/to/domain.crt)"
--env SSHWIFTY_DOCKER_TLSCERTKEY="$(cat /path/to/domain.key)"
--name sshwifty \
niruix/sshwifty:latest
```
`/path/to/domain.crt` and `/path/to/domain.key` must be valid TLS certificate
and key file located on the machine which the `docker run` command is executed.
[Docker]: https://www.docker.com
### Compile from source code (Recommanded if you're a developer)