diff --git a/Docker.md b/Docker.md index f5a2e0b..b032294 100644 --- a/Docker.md +++ b/Docker.md @@ -1,13 +1,38 @@ # Latest Docker Image The `latest` Docker image uses Alpine Linux to keep it ultra small. ```bash -docker run -it -p 8080:8080 hunterlong/statping +docker run -d \ + -p 8080:8080 \ + --restart always \ + hunterlong/statping +``` + +# Mounting Volume +You can mount a volume to the `/app` Statping directory. +```bash +docker run -d \ + -p 8080:8080 \ + -v /mydir/statping:/app \ + --restart always \ + hunterlong/statping +``` + +# Attach a SSL Certificate +When you mount `server.crt` and `server.key` to the `/app` directory, Statping will run a HTTPS server on port 443. +```bash +docker run -d \ + -p 443:443 \ + -v /mydir/domain.crt:/app/server.crt \ + -v /mydir/domain.key:/app/server.key \ + -v /mydir:/app \ + --restart always \ + hunterlong/statping ``` # Development Docker Image If you want to run Statping that was build from the source, use the `dev` Docker image. ```bash -docker run -it -p 8080:8080 hunterlong/statping:dev +docker run -d -p 8080:8080 hunterlong/statping:dev ``` # Cypress Testing Docker Image