tree: fc5a03df5d5fbfd43fbc7618d389e3c846f2b41e [path history] [tgz]
  1. Dockerfile
  2. README.md
docker/README.md

================================

This is the “Dockerfile” that will automatically build the environment of this project.


Features:

What does this Dockerfile do?

    1. Build from centos.
    1. Default is not using proxy. Please see instruction below to set up http/https proxy.
    1. Install yum default “Development Tools”.
    1. Install maven.
    1. Set up environment variables of paths.
    1. Create /ws folder and install nvml dependency pandoc in /ws/pandoc.
    1. Install pmalloc in /ws
    1. Install nvml in /ws.
    1. Set up maven proxy mvn.sh.
    1. Clone mnemonic code then build/install.
    1. Go to /ws fold and start bash.

How to set up proxy?

Set the argument “http_proxy” for the docker option “--build-arg” as follows

  $ docker build -t NAME[:TAG] --build-arg proxy_host="<proxy_host>" proxy_port="<proxy_port>" .

For old version docker v1.10 below, Please replace ARG with ENV and set its value as proxy strings in Dockerfile instead

How to build the docker image from Dockerfile in host OS?

Build from git repository

  $ docker build -t NAME[:TAG] https://github.com/apache/incubator-mnemonic.git#:docker

-- OR --

In the folder of Dockerfile, run:

  $ docker build -t NAME[:TAG] .

Optional: After build, push image to dockerhub:

  $ docker login [OPTIONS] [SERVER]  
  $ docker push [OPTIONS] NAME[:TAG]

How to run image after build

Run image:

  $ docker run --name CONTAINER_NAME -it NAME[:TAG]

Sharing host project folder to Dock container for IDEs e.g. Eclipse, Intellij IDEA

  $ docker run -v <hostdir>/incubator-mnemonic:/ws/incubator-mnemonic -it NAME[:TAG]

Note: this command will override the container's project folder, you can use another name to avoid it.