docker-compose file
version: '3'
services:
jenkins:
image: jenkins/jenkins:2.263.4-lts-slim
network_mode: "host"
environment:
- TZ=Asia/Shanghai
- ANDROID_HOME=/var/jenkins_home/dev_tool/android-sdk-linux
volumes:
- /mnt/jenkins_home:/var/jenkins_home
- /mnt/data:/data
-
ANDROID_HOME
下载linux sdk http://tools.android-studio.org/index.php/sdk
更新sdk版本:
docker exec -it abcd sh
/var/jenkins_home/dev_tool/android-sdk-linux/tools/android update sdk -u --all --filter 26,27,28,29,30
从本地android studio 同意协议,拷贝进 $ANDROID_HOME/licenses/
需要安装32位库
Android SDK中的adb程序是32位的,Ubuntu x64系统需要安装32位库文件,用于兼容32位的程序:
sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1