0% found this document useful (0 votes)
65 views

OKA40i-C-docker Environment Guideline

This document provides instructions for installing Docker on Ubuntu 14.04 and using Docker to compile an Android system. It describes downloading Docker, verifying the installation, restoring a Docker image containing the build environment, and compiling Android within a Docker container. Key steps include installing Docker and related tools on the host, loading a preconfigured image, starting a container from that image, and executing build commands inside the container. Appendices provide references for common Docker container and image commands.

Uploaded by

Raja Mustaqeem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

OKA40i-C-docker Environment Guideline

This document provides instructions for installing Docker on Ubuntu 14.04 and using Docker to compile an Android system. It describes downloading Docker, verifying the installation, restoring a Docker image containing the build environment, and compiling Android within a Docker container. Key steps include installing Docker and related tools on the host, loading a preconfigured image, starting a container from that image, and executing build commands inside the container. Appendices provide references for common Docker container and image commands.

Uploaded by

Raja Mustaqeem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Content

Chapter 1 Install Docker............................................................................................................................................................... 2


1.1 Install Ubuntu14.04 x64bit and Compiling Environment.............................................................................................. 2
1.2 Install Docker Related Lit............................................................................................................................................... 2
1.3 Docker Image Restore.....................................................................................................................................................2
1.4 Compile Android System................................................................................................................................................ 3
Appendix....................................................................................................................................................................................... 4
F1.1 Container Operations.................................................................................................................................................... 4
F1.2 Docker Image Operations............................................................................................................................................. 4
Chapter 1 Install Docker

1.1 Install Ubuntu14.04 x64bit and Compiling Environment

We kindly suggest users using Ubuntu real machine to install docker, and the code we provide for docker is installed in
Ubuntu14.04 LTS 64-bit system.
Note: computer recommendation: Core(TM)i7, RAM above 8GB

1.2 Install Docker Related Lit

All operations in this chapter will be done as a general user and prefix ‘$’ stands for general user
1. Install some necessary system tools
$ sudo apt-get update
$ sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
2. Install GPG certificate
$ curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
3. Write in software source information
$ sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu
$(lsb_release -cs) stable"
4. Update and install Docker-CE
$ sudo apt-get -y update
Check Docker-CE version
$ apt-cache madison docker-ce
docker-ce | 18.06.3~ce~3-0~ubuntu | http://mirrors.aliyun.com/docker-ce/linux/ubuntu/trusty/stable amd64 Packages
Install appointed Docker-CE
Example: $ sudo apt-get -y install docker-ce=18.06.3~ce~3-0~ubuntu
5. Verify
$ sudo docker version

1.3 Docker Image Restore

Please use docker image pack provided by Forlinx, file path is as below
OKA40i-C OKT3-C/ Andriod(A40i V1.1,V1.2)/ Tool/ docker image/ ubuntu14_04lts_for_a40i_android7.tar.gz

Copy the source code pack to virtual machine or reach machine /root/workspace/allwinner/ to generate directory structure
by below command
$ mkdir -p /root/workspace/allwinner
$ cd /root/workspace/allwinner

Release Docker image


1. Verify the integrity of the pack and compare it with md5_sum.txt by below command
$ md5sum ubuntu14_04lts_for_a40i_android7.tar.gz
2. Release the pack by below command
$ tar xvf ubuntu14_04lts_for_a40i_android7.tar.gz
3. Load docker image from backup by below command
$ docker load -i ubuntu14_04lts_for_a40i_android7.tar
4. Check the loaded image ID and name
$ docker images

Change image name and tag


$ docker tag 21f1a026ea52 ubuntu14_04lts_for_a40i_android7:1.0.0

Note: change imaged with ID of 21f1a026ea52 to ubuntu14_04lts_for_a40i_android7


Checked the name changed image
$ docker images

5. Create and run the container


$ docker run -it --privileged=true --cap-add=SYS_ADMIN -v/root/workspace/allwinner:/root/workspace/allwinner -p
10022:22 21f1a026ea52 bin/bash

Below information indicates you are manged to get into the container
root@c4bcf404fa6d:/#
Quit and close the container
exit
6. Check all containers
$ docker ps -a

7. Check all running containers


$ docker ps

8. Run and get into container, ready to compile


# docker start c4bcf404fa6d
# docker exec -it c4bcf404fa6d bin/bash
Status in container
root@c4bcf404fa6d:/#
root@c4bcf404fa6d:/# cd /root/workspace/allwinner

1.4 Compile Android System

Copy Android source code to /root/workspace/allwinner/


Then refer to Android manual to do compiling.
Appendix

F1.1 Container Operations

Close docker: # docker stop c4bcf404fa6d


Run docker: # docker start c4bcf404fa6d
Get into docker: # docker exec -it c4bcf404fa6d bin/bash
Quit docker: c4bcf404fa6d# exit
Check all containers: # docker ps -a
Check all running containers: # docker ps

F1.2 Docker Image Operations

Check all images by command of # docker image ls

You might also like