mirror of
https://github.com/cloudflare/redoctober.git
synced 2026-01-05 04:56:07 +00:00
* make docker: build a docker image for redoctober * add a convenient entrypoint to generate certificates out of the box * add detection based on RO_CERTS and RO_KEYS instead of detection based on the presence of RO_DATA, add RO_CERTS and RO_KEYS which are paths to the ceritificates and keys so we can generate them more effectively. Signed-off-by: Daniel Dao <dqminh@cloudflare.com> * dockerfile: bump golang to 1.7.1
25 lines
825 B
Docker
25 lines
825 B
Docker
FROM golang:1.7.1
|
|
|
|
RUN groupadd -r redoctober --gid=999 && useradd -r -g redoctober --uid=999 redoctober
|
|
|
|
# grab openssl for generating certs and runit for chpst
|
|
RUN apt-get update && \
|
|
apt-get install -y openssl runit
|
|
|
|
COPY . /go/src/github.com/cloudflare/redoctober
|
|
RUN go install github.com/cloudflare/redoctober
|
|
|
|
EXPOSE 8080 8081
|
|
ENV RO_CERTS=/var/lib/redoctober/data/server.crt \
|
|
RO_KEYS=/var/lib/redoctober/data/server.pem \
|
|
RO_DATA=/var/lib/redoctober/data \
|
|
RO_CERTPASSWD=password \
|
|
RO_COMMONNAME=localhost
|
|
|
|
ENTRYPOINT ["/go/src/github.com/cloudflare/redoctober/scripts/docker-entrypoint.sh"]
|
|
CMD ["redoctober", \
|
|
"-addr=:8080", \
|
|
"-vaultpath=/var/lib/redoctober/data/diskrecord.json", \
|
|
"-certs=/var/lib/redoctober/data/server.crt", \
|
|
"-keys=/var/lib/redoctober/data/server.pem"]
|