File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,27 @@ You can substitute the certificate and private key with your own. This example u
2626 - /etc/ssl/private/ssl-cert-snakeoil.key:/app/privkey.pem
2727
2828
29+ ## Choose your ports
30+
31+ You can choose a different internal port instead of 80 and 443 with the ` HTTP_PORT ` and ` HTTPS_PORT ` environment variables.
32+
33+ In this example I'm setting http to listen on 8888, and https to listen on 9999.
34+
35+ docker run -e HTTP_PORT=8888 -e HTTPS_PORT=9999 -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo
36+
37+
38+ With docker compose, this would be
39+
40+ my-http-listener:
41+ image: mendhak/http-https-echo
42+ environment:
43+ - HTTP_PORT=8888
44+ - HTTPS_PORT=9999
45+ ports:
46+ - "8080:8888"
47+ - "8443:9999"
48+
49+
2950
3051## Output
3152
Original file line number Diff line number Diff line change 1+ my-http-listener :
2+ image : mendhak/http-https-echo
3+ environment :
4+ - HTTP_PORT=8888
5+ - HTTPS_PORT=9999
6+ ports :
7+ - " 8080:8888"
8+ - " 8443:9999"
9+ # volumes:
10+ # - /etc/ssl/certs/ssl-cert-snakeoil.pem:/app/fullchain.pem
11+ # - /etc/ssl/private/ssl-cert-snakeoil.key:/app/privkey.pem
You can’t perform that action at this time.
0 commit comments