Skip to content

Commit a415a33

Browse files
committed
updated Dockerfile for Debian bookworm
1 parent e5ef435 commit a415a33

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build Container for AOSP13+ (Docker)
22

33
![GitHub release (latest by date)](https://img.shields.io/github/v/release/alexanderwolz/aosp-docker)
4-
![GitHub](https://img.shields.io/badge/aosp-13-orange)
4+
![GitHub](https://img.shields.io/badge/aosp-14-orange)
55
![GitHub](https://img.shields.io/badge/docker-23.0.1-orange)
66
![GitHub](https://img.shields.io/badge/docker_compose-1.29.2-orange)
77
![GitHub](https://img.shields.io/github/license/alexanderwolz/aosp-docker)
@@ -10,7 +10,7 @@
1010

1111
## About
1212

13-
This repository holds a Dockerfile to provide the needed toolchain for building AOSP13
13+
This repository holds a Dockerfile to provide the needed toolchain for building AOSP14+
1414

1515
## Install Docker CE and Compose
1616
1. Install Docker CE and Docker-Compose on your host machine (recommended: Debian, 30GB+, 8 Cores, 250GB+ HDD)
@@ -23,7 +23,7 @@ This repository holds a Dockerfile to provide the needed toolchain for building
2323

2424
## Download AOSP source
2525
This follows the normal AOSP approach, e.g.
26-
1. ```repo init --depth=1 -u https://android.googlesource.com/platform/manifest -b android-13.0.0_r11```
26+
1. ```repo init --depth=1 -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r14```
2727
2. ```repo sync -c --no-tags --no-clone-bundle -j$(nproc --all)```
2828

2929
## Build AOSP

build/Dockerfile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:bullseye-20220125-slim
1+
FROM debian:bookworm-20231120-slim
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -8,7 +8,7 @@ gnupg zlib1g-dev libncurses5 x11proto-core-dev libx11-dev libgl1-mesa-dev gperf
88
libc6-dev libxml2-utils xsltproc fontconfig openjdk-17-jdk libncurses6 procps \
99
gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev lib32z1-dev ccache \
1010
gnupg rsync lib32z1-dev python3 && ln -sf /usr/bin/python3 /usr/bin/python \
11-
&& adduser --system --group --uid 1000 aosp
11+
&& adduser --system --group --uid 1000 --home /home/aosp aosp
1212

1313
# see https://source.android.com/setup/develop#installing-repo
1414
ARG REPO=/bin/repo
@@ -24,18 +24,15 @@ VOLUME /ccache
2424
RUN git config --global user.name "Your Name" \
2525
&& git config --global user.email "you@example.com"
2626

27-
WORKDIR /aosp
28-
2927
USER aosp
3028

31-
#aliases
32-
RUN echo "alias lstat=\"stat -L\"" >> ~/.bashrc
29+
RUN echo "alias lstat=\"stat -L\"" >> /home/aosp/.bashrc \
30+
&& echo "export USE_CCACHE=1" >> /home/aosp/.bashrc \
31+
&& echo "export CCACHE_EXEC=/usr/bin/ccache" >> /home/aosp/.bashrc \
32+
&& echo "export CCACHE_DIR=/ccache" >> /home/aosp/.bashrc \
33+
&& echo "ccache -M 50G > /dev/null" >> /home/aosp/.bashrc
3334

34-
#enable ccache
35-
RUN echo "export USE_CCACHE=1" >> ~/.bashrc \
36-
&& echo "export CCACHE_EXEC=/usr/bin/ccache" >> ~/.bashrc \
37-
&& echo "export CCACHE_DIR=/ccache" >> ~/.bashrc \
38-
&& echo "ccache -M 50G > /dev/null" >> ~/.bashrc
35+
WORKDIR /aosp
3936

4037
# we want to run that container forever until we shut it down manually
4138
# TODO find a better way

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ services:
88
volumes:
99
- /etc/localtime:/etc/localtime:ro
1010
- /etc/timezone:/etc/timezone:ro
11-
- ./config/gitconfig:/root/.gitconfig:ro
11+
- ./config/gitconfig:/home/aosp/.gitconfig:ro
1212
- ~/aosp:/aosp:rw
1313
- ~/ccache:/ccache:rw

0 commit comments

Comments
 (0)