refine
This commit is contained in:
28
docker/Dockerfile
Normal file
28
docker/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ARG userid
|
||||
ARG groupid
|
||||
ARG username
|
||||
|
||||
# COPY apt.conf /etc/apt/apt.conf
|
||||
|
||||
COPY sources.list etc/apt/sources.list
|
||||
|
||||
# gettext python-mako python3-mako used to build mesa3d
|
||||
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python gettext python-mako python3-mako
|
||||
|
||||
RUN curl -o /usr/local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo \
|
||||
&& chmod a+x /usr/local/bin/repo
|
||||
|
||||
RUN groupadd -g $groupid $username \
|
||||
&& useradd -m -u $userid -g $groupid $username \
|
||||
&& echo $username >/root/username \
|
||||
&& echo "$username:$username" | chpasswd && adduser $username sudo
|
||||
|
||||
ENV HOME=/home/$username \
|
||||
USER=$username \
|
||||
PATH=/src/.repo/repo:/src/prebuilts/jdk/jdk8/linux-x86/bin/:$PATH \
|
||||
USE_CCACHE=1 \
|
||||
CCACHE_DIR=/src/.ccache
|
||||
|
||||
ENTRYPOINT chroot --userspec=$(cat /root/username):$(cat /root/username) / /bin/bash -i
|
||||
12
docker/README.md
Normal file
12
docker/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Build ReDroid with docker
|
||||
|
||||
create build image: `docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t android-build-trusty .`
|
||||
run build image: `docker run -it --rm -v $ANDROID_BUILD_TOP:/src android-build-trusty`
|
||||
|
||||
build *ReDroid*:
|
||||
- `cd /src; . build/envsetup.sh`
|
||||
- `lunch`
|
||||
- `m`
|
||||
|
||||
sync build (required)
|
||||
- `export BUILD_OUT=~/redroid_out && ./sync.sh` (pasword same as `id -un`)
|
||||
3
docker/apt.conf
Normal file
3
docker/apt.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
Acquire::https::proxy "http://some-proxy:8080";
|
||||
Acquire::https::proxy "https://some-proxy:8080/";
|
||||
10
docker/sources.list
Normal file
10
docker/sources.list
Normal file
@@ -0,0 +1,10 @@
|
||||
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
|
||||
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
|
||||
Reference in New Issue
Block a user