auth
2015-06-29
auth/authd/Dockerfile
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.
| paddy@175 | 1 FROM busybox |
| paddy@175 | 2 |
| paddy@175 | 3 ADD docker-authd /bin/authd/authd |
| paddy@175 | 4 ADD templates /bin/authd/templates |
| paddy@175 | 5 ADD wrapper.sh /bin/authd/run.sh |
| paddy@175 | 6 ADD ca-certificates.crt /etc/ssl/certs/ |
| paddy@175 | 7 |
| paddy@175 | 8 WORKDIR /bin/authd |
| paddy@175 | 9 |
| paddy@175 | 10 EXPOSE 9000 |
| paddy@175 | 11 |
| paddy@175 | 12 CMD ["./run.sh"] |