Skip to content

Instantly share code, notes, and snippets.

@joneskoo
Last active July 4, 2016 16:30
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 joneskoo/58ceae09fd7144f28778b71058d6ad42 to your computer and use it in GitHub Desktop.
Save joneskoo/58ceae09fd7144f28778b71058d6ad42 to your computer and use it in GitHub Desktop.
remoteu2f-proxy dockerfile
FROM golang:1.6
RUN go get -u \
github.com/golang/protobuf/proto \
github.com/golang/protobuf/protoc-gen-go
RUN go get -d blitiri.com.ar/go/remoteu2f/remoteu2f-proxy
RUN cd /go/src/blitiri.com.ar/go/remoteu2f/ && git remote rm origin && git remote add origin https://github.com/joneskoo/remoteu2f && git pull origin rebuild-protobuf
RUN go install blitiri.com.ar/go/remoteu2f/remoteu2f-proxy
RUN mkdir /etc/remoteu2f-proxy && ( for i in `seq 1 10`; do head -c60 /dev/urandom | sha256sum -b | cut -d ' ' -f 1 ; done ) > /etc/remoteu2f-proxy/tokens
RUN openssl req -x509 -sha256 -newkey rsa:2048 -keyout /etc/ssl/yourkey.key -out /etc/ssl/yourcert.crt -days 3650 -nodes -subj '/CN=localhost'
CMD ["/go/bin/remoteu2f-proxy", \
"--base_url=https://localhost", \
"-tls_cert=/etc/ssl/yourcert.crt", \
"-tls_key=/etc/ssl/yourkey.key", \
"-token_file=/etc/remoteu2f-proxy/tokens"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment