This repository has been archived by the owner on Jan 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Dockerfile and add note about non-persisting gopath
- Loading branch information
Showing
4 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
FROM clouder/base:3.4 | ||
MAINTAINER Dave Lasley <[email protected]> | ||
|
||
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"] |