Docker and docker tutorials
Configuration of installing Docker and Fig and their environment in ubuntu
1. Docker Installation
Install Docker using the apt-get command:
$sudo apt-get install docker.io
Start the service and daemon
$sudo service docker.io status
$sudo service docker.io start
Create a soft connection
ln-sf /usr/bin/docker.io /usr/local/bin/docker
Check the installation result: Enter the docker command. If the installation is successful, the result is as follows:
2. Installation of Fig
$sudo apt-get remove python-pip
$wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$sudo python get-pip.py
$sudo pip install -U fig
Check the installation result: Enter the command fig. If the installation is successful, the result is as follows:
3. Environment configuration of Fig
Create the fig. vml file at any file location. The content is as follows:
ndk:
image:davidsiaw/ndk-env
volumes:
-./adas/:/src
environment:
-JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
4. Run the following command in the directory of fig. yml:
Run in the directory of fig. yml # The image "David siaw/ndk-env" will be downloaded for the first time, which is a little slow.
figrun --rm ndk /bin/bash
# Enter the docker environment and copy the sample code
cp-r /android/android-ndk-r9/samples/hello-jni/* /src/
# Exit the current docker Environment
exit
# Compile the project. The compilation commands ndk-build and antdebug are automatically executed.
figrun --rm ndk
(Yellow marked as not implemented)
Dong jinbao
2015-03-23