diff --git a/.travis.yml b/.travis.yml index 7b38709..c0c330d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ install: script: - docker run -d -p 8080:8080 --name cfssl-exec-$TRAVIS_BUILD_NUMBER -t $TRAVIS_BUILD_NUMBER - sleep 5 - - curl --fail https://localhost:8080/ + - curl -k --fail https://localhost:8080/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..06945e4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +FROM golang:alpine +MAINTAINER Dave Lasley + +ENV RO_CERTPASSWD="password" \ + RO_COMMONNAME="localhost" \ + RO_DATA="/var/lib/redoctober/data" + +ENV RO_CERTS="${RO_DATA}/server.crt" \ + RO_KEYS="${RO_DATA}/server.pem" + +RUN addgroup -S redoctober \ + && adduser -S -g redoctober redoctober + +# Install Build Dependencies +ENV buildDeps "build-base \ + gcc \ + git \ + libtool" + +RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories + +RUN apk add --no-cache $buildDeps \ + runit \ + openssl + +# Install Red October +RUN git clone --depth=1 https://github.com/cloudflare/redoctober.git $GOPATH/src/github.com/cloudflare/redoctober \ + && go install github.com/cloudflare/redoctober + +RUN apk del $buildDeps + +# Setup Environment + +ENTRYPOINT ["/go/src/github.com/cloudflare/redoctober/scripts/docker-entrypoint.sh"] + +CMD ["redoctober", \ + "-addr=0.0.0.0:8080", \ + "-vaultpath=/var/lib/redoctober/data/diskrecord.json", \ + "-certs=/var/lib/redoctober/data/server.crt", \ + "-keys=/var/lib/redoctober/data/server.pem", \ + "-metrics-host=0.0.0.0", \ + "-metrics-port=8081"] diff --git a/README.md b/README.md index 794065f..1c7a627 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ pleasure: | Name | Default | Description | |------|---------|-------------| - +| RO_CERTPASSWD | password | Password for the Red October certificate | +| RO_COMMONNAME | localhost | Common Name for the server | +| RO_DATA | /var/lib/redoctober/data | Where to store all of the data | Known Issues / Roadmap ======================