hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amaya382 <...@git.apache.org>
Subject [GitHub] incubator-hivemall pull request #81: [HIVEMALL-84-3] Update docker-compose.y...
Date Fri, 19 May 2017 12:09:18 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message