auth
2015-06-29
auth/authd/wrapper.sh
Create Docker image for authd. Create a Dockerfile for authd, which will wrap the compiled Go binary up into a tiny little Docker image. Create an authd/build-docker.sh script that will build the statically-linked binary in a Docker container, so the authd Docker image can use it. We had to include ca-certificates.crt in the Dockerfile, as well, so we could communicate over SSL with things. A wrapper.sh file is included that will pull the JWT_SECRET environment variable out of a kubernetes secrets file, which is a handy wrapper to have. Finally, we added the authd/docker-authd binary to the .hgignore.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/authd/wrapper.sh Mon Jun 29 23:50:15 2015 -0400 1.3 @@ -0,0 +1,7 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +JWT_SECRET_FILE=${JWT_SECRET_FILE:-/private/kubernetes/jwt/secret} 1.7 + 1.8 +JWT_SECRET=`cat ${JWT_SECRET_FILE}` 1.9 + 1.10 +JWT_SECRET="${JWT_SECRET}" JWT_SECRET_IS_BASE64_ENCODED="true" ./authd