HTTP to HTTPS redirect Docker image
Go Shell
Latest commit dafeec1 Feb 14, 2017 @blueimp Initial commit.
Permalink
Failed to load latest commit information.
.dockerignore Initial commit. Feb 14, 2017
.gitignore Initial commit. Feb 14, 2017
Dockerfile Initial commit. Feb 14, 2017
Dockerfile.build Initial commit. Feb 14, 2017
README.md Initial commit. Feb 14, 2017
build.sh Initial commit. Feb 14, 2017
docker-compose.yml Initial commit. Feb 14, 2017
http2https Initial commit. Feb 14, 2017
main.go Initial commit. Feb 14, 2017

README.md

HTTP to HTTPS redirect Docker image

Usage

Redirect all HTTP requests to HTTPS:

docker run -d -p '80:8080' blueimp/http2https [hostname][:port]

The port argument allows to override the redirect port, which is by default the HTTPS port 443.
To distinguish between a single port and a single hostname argument, the port must always be prefixed with a colon (e.g. :8443).
The hostname argument allows to override the default redirect hostname, which by default is taken from the Host client header.

Development

Build the redirect service as statically compiled Linux binary:

docker-compose up build

Build and run the redirect service:

docker-compose up --build -d serve

Test the redirect service:

docker-compose up test

Remove the containers and local build images:

docker-compose down --rmi local

License

Released under the MIT license.

Author

Sebastian Tschan