You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mnemonic.apache.org by ga...@apache.org on 2016/08/26 16:30:44 UTC

[5/6] incubator-mnemonic git commit: MNEMONIC-93: Add Readme.md about Dockerfile build and Usage

MNEMONIC-93: Add Readme.md about Dockerfile build and Usage


Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/af6f7f57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/af6f7f57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/af6f7f57

Branch: refs/heads/master
Commit: af6f7f5791733cd2c77c141162babd1c832500af
Parents: 29e36cd
Author: Xiaomin Song <xi...@gmail.com>
Authored: Thu Aug 25 14:58:14 2016 -0700
Committer: Xiaomin Song <xi...@gmail.com>
Committed: Fri Aug 26 00:13:12 2016 -0700

----------------------------------------------------------------------
 docker/README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/af6f7f57/docker/README.md
----------------------------------------------------------------------
diff --git a/docker/README.md b/docker/README.md
new file mode 100644
index 0000000..51ad381
--- /dev/null
+++ b/docker/README.md
@@ -0,0 +1,61 @@
+<img src="http://nonvolatilecomputing.github.io/Mnemonic/images/mnemonic_logo.png" width=200 />
+
+================================ 
+
+This is the "Dockerfile" that will automatically build the environment of this project. 
+
+--------------
+### Features:
+
+*What does this Dockerfile do?* 
+
+- 1. Build from centos.
+- 2. Default is not using porxy. Please see instruction below to set up http/https proxy.
+- 3. Install yum default "Development Tools".
+- 4. Install maven.
+- 5. Set up environment variables of paths.
+- 6. Create /ws folder and install pmalloc.
+- 7. Install nvml in /ws.
+- 8. Set up maven proxy mvn.sh.
+- 9. Clone mnemonic code then build/install.  
+- 10. Go to /ws fold and start bash.  
+
+#### How to set up proxy? 
+
+Input IP address and port as the example below, then uncomment all other ENV lines. 
+```bash
+ENV proxy_host "172.17.42.1"
+ENV proxy_port "8668"
+ENV http_proxy "http://${proxy_host}:${proxy_port}"
+ENV https_proxy ${http_proxy}
+ENV HTTP_PROXY ${http_proxy}
+ENV HTTPS_PROXY ${http_proxy}
+ENV proxy ${http_proxy}
+```
+
+### How to build the docker image from Dockerfile in host OS?
+ 
+In the folder of Dockerfile, run: 
+
+```bash
+  $ docker build -t NAME[:TAG] .
+```
+* More detials please refer to [Docker build reference](https://docs.docker.com/engine/reference/commandline/build/)
+
+#### Optional: After build, push image to dockerhub: 
+
+```bash
+  $ docker login [OPTIONS] [SERVER]  
+  $ docker push [OPTIONS] NAME[:TAG]
+```
+* More detials please refer to [Docker login reference](https://docs.docker.com/engine/reference/commandline/login/)
+ and [Docker push reference](https://docs.docker.com/engine/reference/commandline/push/)
+
+### How to run image after build
+
+Run image:
+```bash
+  $ docker run --name CONTAINER_NAME -it NAME[:TAG]
+```
+ * More detials please refer to [Docker run reference](https://docs.docker.com/engine/reference/run/)
+