Skip to content

Instantly share code, notes, and snippets.

@imos
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imos/9f6930c0b1af03fe6988 to your computer and use it in GitHub Desktop.
Save imos/9f6930c0b1af03fe6988 to your computer and use it in GitHub Desktop.
Makefile and Dockerfile for sslh
FROM ubuntu:14.04
MAINTAINER Kentaro Imajo <docker@imoz.jp>
RUN apt-get update -qq && apt-get -y install sslh
ENTRYPOINT sslh -f -u root -p 0.0.0.0:443 --ssh ${MASTER_HOST}:22 --ssl ${MASTER_HOST}:10443
EXPOSE 443
start: stop check
cat sslh.docker | docker build --tag=imos/sslh -
docker run --env=MASTER_HOST=$$(hostname) --name=sslh --publish=443:443 --detach imos/sslh
.PHONY: start
stop: check
-docker kill sslh 2>/dev/null
-docker rm sslh 2>/dev/null
.PHONY: stop
check:
test "$$(whoami)" = 'root'
.PHONY: check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment