-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that the sample application properly ran in Docker container, that's nice.
One concern is that you generate copies of YAML files for docker, which might be a burden from maintenance viewpoint (imagine that if we add some new config parameters, then we might have to update two places). I think that we can use viper's function to override configs from files with environment variables, and my brief check showed that keys
in peer.yaml
can be overridden by environment variable PEER_KEYS
. Unfortunately, peers
in consensus.yaml
is loaded separately from peer.yaml
so we need change application code to override it with environment variable. So I don't think this should be done in this PR.
sample/docker/README.md
Outdated
@@ -0,0 +1,29 @@ | |||
# Docker Image # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the title can be more descriptive like "Running sample application as Docker containers".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could also be a concise title followed by some short description.
sample/docker/README.md
Outdated
## Prerequisites ## | ||
|
||
To try this, be sure [Docker](https://www.docker.com) (Docker Engine | ||
and Docker Compose) are installed on your system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first time we mention docker in this project, so it would be kind to add some basic notes on docker (I mean for example that "you need to run this as root with sudo
", or "you have to check that docker service is running" or something like that) or to point to some references (Hyperledger Fabric does this). With that, we can avoid questions about docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for great work. I particularly like the way the docker file is structured with multi-stage build. I think we could also consider adding top-level make targets to build docker images and use those in the example as future work.
README.md
Outdated
@@ -161,6 +164,9 @@ export SGX_MODE=SIM | |||
|
|||
## Getting Started ## | |||
|
|||
Note: We have [a Docker image](sample/docker/README.md) to try this | |||
project quickly. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just mention that the following steps apply to native build, and suggest trying out Docker to get started easily? Maybe we could even make it the default option at once?
sample/docker/README.md
Outdated
@@ -0,0 +1,29 @@ | |||
# Docker Image # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could also be a concise title followed by some short description.
@Naoya-Horiguchi @sergefdrv Thanks for your many suggestions. I have update the code as well as the document. I the latest commit, I deleted |
@Naoya-Horiguchi I understand your concern. In the last commit, I tried avoiding the duplication of the config files by creating
|
|
||
This quick start shows you how to runnning this project using Docker | ||
containers. This is the easiest way to try out this project with minimal | ||
setup. If you want to build and run without Docker, skip this section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(EDITED) Actually I like putting this new section subtree just before "Roadmap" section and inserting short notes as you did in the previous version. But this might conflict with Sergey's suggestion, so I'm fine if you decide to go with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this PR looks to me much better now! I just left some minor comments.
@Naoya-Horiguchi @sergefdrv Thanks for comments. I have updated. Changes from the previous revision (diffs):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just left a couple of tiny comments.
This patch includes a Dockerfile for the example described in README.md. By using this, a user can try our project without environment setup. Signed-off-by: Yuta Namiki <[email protected]>
Thanks for suggestions! I have updated again (diffs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks!
A Dockerfile for the example described in README.md in the project root. By using this, a user can try our project without environment setup (i.e. installing SGX SDK, build, etc.). Note that, in this container, we use the SGX simulation mode so an Intel SGX-equipped processor is not required to run.
This is a part of #163. I'll try to create another Dockerfile for the HW mode later in another PR.