tree: 09c6de616567b68be8cbf3b2164e97fc2edfa9e5 [path history] [tgz]
  1. docker-CentOS/
  2. docker-Fedora/
  3. docker-Ubuntu/
  4. README.md
docker/README.md

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

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


Features:

What does the Dockerfile do?

    1. Build from centos/ubuntu.
    1. Install dependency packages.
    1. Set up environment variables of paths.
    1. Create /ws folder.
    1. Install pmalloc in /ws
    1. Clone mnemonic code then build/install.
    1. Go to /ws fold and start bash.

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

Build from git repository

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

-- 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>/mnemonic:/ws/mnemonic -it NAME[:TAG]

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