[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-06-06 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-hivemall/pull/81


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-22 Thread myui
Github user myui commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117716977
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

We can only publish TAGGED image associated with ASF official release. CI 
release is not allowed in ASF distribution policies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-22 Thread amaya382
Github user amaya382 commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117687709
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

It seems better to distribute TAGGED images on docker hub 
(`apache/hivemall`) by automated build and distributing NOT TAGGED ones should 
depend on manual build from Dockerfile.
(The former for evaluation by user, the latter for developer)

http://www.apache.org/dev/release-distribution.html#unreleased


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-20 Thread myui
Github user myui commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117606427
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

I'll ask for ASF INFRA to get an access to  https://hub.docker.com/u/apache/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-20 Thread amaya382
Github user amaya382 commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117606391
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

It's redundant but depart from docker's usual practice...
e.g.
* automated build uses branch or tag (on git) as tag (on docker)
* if become an official repository or under apache, its name will be broken


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-20 Thread myui
Github user myui commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117604997
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

owner is used for repository.
repository is used for branch.
tag is used for versioning.

hivemall:release:v0.5-rc.1
hivemall:lastest:20170502-1
hivemall:spark:20170501

owner: hivemall is used only for hivemall. So, okey as it is.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-20 Thread takuti
Github user takuti commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117603729
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

Or, if @amaya382 can set up this, it would be nice after this PR has been 
merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-20 Thread takuti
Github user takuti commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117603712
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

Ah, I see. This part is written by @myui in commit 
10e7d450fa8257efc5d614957fda514b2b91fdee. 

Hi @myui, could you make further discussion in here or another issue? I 
guess this part was temporarily necessary for the BoF session of the Apache 
BigData conf.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-19 Thread amaya382
Github user amaya382 commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117463834
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
+
+```
+$ docker run ... --volume /path/to/local/hivemall:/opt/hivemall
+```
+
+## Running pre-built Docker image in Docker Hub
 
 You can find pre-built Hivemall docker images in [this 
repository](https://hub.docker.com/r/hivemall/latest/).
 
+1. Check [the latest tag](https://hub.docker.com/r/hivemall/latest/tags/) 
first
--- End diff --

This repository is in the wrong way, must be fixed its name as `hivemall` 
and its tag as version (`{owner}/{repository}:{tag}`, like 
`hivemall/hivemall:latest` or `hivemall/hivemall:0.4.2-rc.2`).
And if distribute image via dokcerhub, we should prepare automated build to 
retain consistency and integrity.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...

2017-05-19 Thread amaya382
Github user amaya382 commented on a diff in the pull request:

https://github.com/apache/incubator-hivemall/pull/81#discussion_r117462083
  
--- Diff: docs/gitbook/docker/getting_started.md ---
@@ -31,38 +31,73 @@ This page introduces how to run Hivemall on Docker.
 
 # 1. Build image
 
-## Build using docker-compose
+You have two options in order to build a **hivemall** docker image:
+
+## Using `docker-compose`
   
-  `docker-compose -f resources/docker/docker-compose.yml build`
+```
+$ docker-compose -f resources/docker/docker-compose.yml build
+```
 
-## Build using docker command
+## Using `docker` command
   
-  `docker build -f resources/docker/Dockerfile .`
+```
+$ docker build -f resources/docker/Dockerfile .
+```
 
 >  Note
-> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using existing Docker images.
+> You can 
[skip](./getting_started.html#running-pre-built-docker-image-in-dockerhub) 
building images by using a pre-build docker image from Docker Hub.
 
 # 2. Run container
 
-## Run by docker-compose
+If you built an image by yourself, it can be launched by either 
`docker-compose` or `docker` command:
+
+## By `docker-compose`
+
+```
+$ docker-compose -f resources/docker/docker-compose.yml up -d && docker 
attach hivemall
+```
+
+You can edit `resources/docker/docker-compose.yml` as needed.
+
+For example, setting `volumes` options enables to mount your local 
directories to the container as follows:
 
-  1. Edit `resources/docker/docker-compose.yml`
-  2. `docker-compose -f resources/docker/docker-compose.yml up -d && 
docker attach hivemall`
+```yml
+volumes:
+  - "../../:/opt/hivemall/" # mount current hivemall dir to 
`/opt/hivemall` ($HIVEMALL_PATH) on the container
+  - "/path/to/data/:/root/data/" # mount resources to container-side  
`/root/data` directory
+```
 
-## Run by docker command
+## By `docker` command
 
-  1. Find a local docker image by `docker images`.
-  2. Run `docker run -it ${docker_image_id}`. 
- Refer [Docker 
reference](https://docs.docker.com/engine/reference/run/) for the command 
detail.
+Find a local docker image by `docker images`, and hit:
 
-## Running pre-built Docker image in Dockerhub
+```
+$ docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
${docker_image_id}
+```
 
-  1. Check [the latest 
tag](https://hub.docker.com/r/hivemall/latest/tags/) first.
-  2. Pull pre-build docker image from Dockerhub `docker pull 
hivemall/latest:20170517`
-  3. `docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it 
hivemall/latest:20170517`
+Refer [Docker reference](https://docs.docker.com/engine/reference/run/) 
for the command detail.
+
+Similarly to the `volumes` option in the `docker-compose` file, `docker 
run` has `--volumes` option: 
--- End diff --

typo `--volume`. as an other choice, `-v` would be easier


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---