Conversation
| WORKDIR /go/src/github.com/google/trillian | ||
|
|
||
| RUN go get -d -v ./server/trillian_log_server | ||
| RUN go install ./server/trillian_log_server |
There was a problem hiding this comment.
Why do you tell go get not to install trillian_log_server (using the -d flag), then immediately install it using go install?
There was a problem hiding this comment.
Here I'm following Dockerfile examples
Looks like doing it in one line is ok too.
| ENV RPC_PORT 8090 | ||
| ENV HTTP_PORT 8091 | ||
|
|
||
| ENV DUMP_METRICS 0s |
There was a problem hiding this comment.
8a49391 to
3fa74e7
Compare
|
How we doing with this one? |
|
This is updated and ready for review. |
|
|
||
| RUN go get ./server/vmap/trillian_map_server | ||
|
|
||
| # Run the outyet command by default when the container starts. |
There was a problem hiding this comment.
Removed. This was left over from an example file.
| --http_endpoint="$HOST:$HTTP_PORT" \ | ||
| --dump_metrics_interval="$DUMP_METRICS" \ | ||
| --sequencer_guard_window="$SEQUENCER_GUARD_WINDOW" \ | ||
| --force_master="$FORCE_MASTER" |
There was a problem hiding this comment.
This is missing the --alsologtostderr flag that the other Dockerfiles have.
| @@ -0,0 +1,30 @@ | |||
| FROM golang | |||
|
|
|||
| ENV DB_USER=test \ | |||
There was a problem hiding this comment.
It might be better to use ARG rather than ENV, so that these values can be overridden when building the image. I'm ok with ENV though.
There was a problem hiding this comment.
ENV allows the arguments to be overridden at runtime which might be even more flexible than fixing them at build time.
There was a problem hiding this comment.
The documentation suggests using both, by declaring an ARG first and then using its value to initialize the ENV. I'm fine with leaving it as it is though, just thought I'd highlight this option.
| MYSQL_DATABASE=test \ | ||
| MYSQL_RANDOM_ROOT_PASSWORD=yes | ||
|
|
||
| ADD storage/mysql/storage.sql /docker-entrypoint-initdb.d/storage.sql |
There was a problem hiding this comment.
What is this Dockerfile for?
There was a problem hiding this comment.
This is the Docker equivalent of ./script/resetdb since this particular mysql image runs all the sql scripts in /docker-entrypoint-initdb.d when it's being initialized.
|
PTAL |
Support building trillian clusters by defining docker build files. They should be run like so: `docker build -f server/trillian_log_server/Dockerfile .` from `$GOPATH/src/github.com/google/trillian`
|
To answer your question about Kubernetes, I'll use these Dockerfiles to create images that can be run by Kubernetes. Then I need to write some Kubernetes config files that tell it how to configure and run the Trillian server and signer, and where to find the MySQL server. |
Support building trillian clusters by defining docker build files.
They should be run like so:
docker build -f server/trillian_log_server/Dockerfile .from$GOPATH/src/github.com/google/trillianPlease correct me if these are the wrong binaries to be defining definitions for.
I see that there's also a
server/main.gowhich has some duplicate functionality.