Docker image which enables your site with self-signed HTTPS easily
2.3K
Docker image which enables your site with self-signed HTTPS easily

Suppose http://localhost:8181/ is running. The following command runs a HTTPS server on port 8080.
docker run -p 8080:80 -p 4443:443 -it -e TARGET_HOST=localhost -e TARGET_PORT=3000 nwtgck/self-signed-https
Here is an example docker-compose.yml.
In the example, self-signed HTTPS server is running on https://localhost:4443.
version: '3.1'
services:
self-signed-https:
image: nwtgck/self-signed-https:v0.1.0
ports:
- '8080:80'
- '4443:443'
depends_on:
- ghost
restart: always
environment:
TARGET_HOST: ghost
TARGET_PORT: 2368
volumes:
- ./docker_volumes/ssl_certs:/ssl_certs
ghost:
image: ghost
restart: always
expose:
- "2368"
(from: compose-examples/ghost/docker-compose.yml)
The following files are located at ./docker_volumes/ssl_cert in the above example.
server.keyserver.csrserver.crt| name | description | required or default value |
|---|---|---|
| TARGET_HOST | Host of destination | REQUIRED |
| TARGET_PORT | HTTP port of destination | 80 |
| SERVER_HTTP_PORT | HTTP port of Self-signed HTTPS server | 80 |
| SERVER_HTTPS_PORT | HTTPS port of Self-signed HTTPS server | 443 |
Content type
Image
Digest
Size
8.6 MB
Last updated
about 8 years ago
docker pull nwtgck/self-signed-https