diff --git a/clouder_template_red_october/README.rst b/clouder_template_red_october/README.rst index 4802fbb..00c652d 100644 --- a/clouder_template_red_october/README.rst +++ b/clouder_template_red_october/README.rst @@ -49,6 +49,11 @@ Known issues / Roadmap * The service is currently using a self-signed certificate. This should be changed once a CA exists. * Runit is being installed via community repos, which are HTTP only. This is insecure. +* Path isn't persisting so there is a symlink to redoctober being created. This should be fixed at some point, + likely in a base Go container instead of here. +* Image volume is being mounted as root, then chown is happening in the docker entrypoint. This sseems weird, + so should investigate further, but is how the CloudFlare people rigged it up so it's possible they're simply + smarter than me. Bug Tracker =========== diff --git a/clouder_template_red_october/data/image_port.xml b/clouder_template_red_october/data/image_port.xml index 3c547e3..d2a05c6 100644 --- a/clouder_template_red_october/data/image_port.xml +++ b/clouder_template_red_october/data/image_port.xml @@ -12,11 +12,11 @@ 8080 - - comm + metrics 8081 diff --git a/clouder_template_red_october/data/image_volume.xml b/clouder_template_red_october/data/image_volume.xml index 7e9e4b6..1ae494f 100644 --- a/clouder_template_red_october/data/image_volume.xml +++ b/clouder_template_red_october/data/image_volume.xml @@ -10,7 +10,7 @@ data /var/lib/redoctober/data - redoctober + root diff --git a/clouder_template_red_october/images/exec/Dockerfile b/clouder_template_red_october/images/exec/Dockerfile index 695e88c..e1c7091 100644 --- a/clouder_template_red_october/images/exec/Dockerfile +++ b/clouder_template_red_october/images/exec/Dockerfile @@ -1,6 +1,9 @@ FROM clouder/base:3.4 MAINTAINER Dave Lasley +ARG RO_CERTPASSWD="password" +ARG RO_COMMONNAME="localhost" + RUN addgroup -S redoctober \ && adduser -S -g redoctober redoctober @@ -19,18 +22,28 @@ RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /et RUN apk add --no-cache $buildDeps # Install Red October -RUN git clone --depth=1 https://github.com/cloudflare/redoctober.git /usr/lib/go/src/github.com/cloudflare/redoctober -RUN go install github.com/cloudflare/redoctober +RUN git clone --depth=1 https://github.com/cloudflare/redoctober.git /usr/lib/go/src/github.com/cloudflare/redoctober \ + && go install github.com/cloudflare/redoctober + +ENV GOROOT="/usr/lib/go" \ + GOPATH="/gopath" \ + GOBIN="/gopath/bin" \ + PATH="$PATH:$GOROOT/bin:$GOPATH/bin" + +# Path isn't persisting for some reason. +RUN ln -s "$GOROOT/bin/redoctober" /usr/bin # Setup Environment -ENV RO_DATA=/var/lib/redoctober/data \ - RO_CERTS=$RO_DATA/server.crt \ - RO_KEYS=$RO_DATA/server.pem +ENV RO_DATA="/var/lib/redoctober/data" +ENV RO_CERTS="${RO_DATA}/server.crt" \ + RO_KEYS="${RO_DATA}/server.pem" \ + RO_CERTPASSWD="${RO_CERTPASSWD}" \ + RO_COMMONNAME="${RO_COMMONNAME}" -ENTRYPOINT ["/go/src/github.com/cloudflare/redoctober/scripts/docker-entrypoint.sh"] +ENTRYPOINT ["/usr/lib/go/src/github.com/cloudflare/redoctober/scripts/docker-entrypoint.sh"] CMD ["redoctober", \ - "-addr=:8080", \ - "-vaultpath=$RO_DATA/diskrecord.json", \ - "-certs=$RO_CERTS", \ - "-keys=$RO_KEYS"] + "-addr=:8080", \ + "-vaultpath=/var/lib/redoctober/data/diskrecord.json", \ + "-certs=/var/lib/redoctober/data/server.crt", \ + "-keys=/var/lib/redoctober/data/server.pem"]