mirror of
https://github.com/izzy2lost/docker-android.git
synced 2026-06-19 01:16:28 -07:00
Splitted into different Dockerfiles to optimize size for each docker image
This commit is contained in:
+9
-2
@@ -103,6 +103,12 @@ function build() {
|
||||
|
||||
# Build docker image(s)
|
||||
for p in "${processors[@]}"; do
|
||||
if [ "$p" == "x86" ]; then
|
||||
FILE_NAME=docker/Emulator_x86
|
||||
else
|
||||
FILE_NAME=docker/Emulator_arm
|
||||
fi
|
||||
|
||||
for v in "${versions[@]}"; do
|
||||
# Find image type
|
||||
if [ "$v" == "5.0.1" ] || [ "$v" == "5.1.1" ]; then
|
||||
@@ -118,12 +124,13 @@ function build() {
|
||||
image_version="$IMAGE-$p-$v:$RELEASE"
|
||||
image_latest="$IMAGE-$p-$v:latest"
|
||||
echo "[BUILD] Image name: $image_version and $image_latest"
|
||||
echo "[BUILD] Dockerfile: $FILE_NAME"
|
||||
docker build -t $image_version --build-arg ANDROID_VERSION=$v --build-arg BUILD_TOOL=$LATEST_BUILD_TOOL \
|
||||
--build-arg API_LEVEL=$level --build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img \
|
||||
--build-arg IMG_TYPE=$IMG_TYPE .
|
||||
--build-arg IMG_TYPE=$IMG_TYPE -f $FILE_NAME .
|
||||
docker build -t $image_latest --build-arg ANDROID_VERSION=$v --build-arg BUILD_TOOL=$LATEST_BUILD_TOOL \
|
||||
--build-arg API_LEVEL=$level --build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img \
|
||||
--build-arg IMG_TYPE=$IMG_TYPE .
|
||||
--build-arg IMG_TYPE=$IMG_TYPE -f $FILE_NAME .
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user