Splitted into different Dockerfiles to optimize size for each docker image

This commit is contained in:
butomo1989
2017-05-22 13:20:30 +02:00
parent d1a1bb5fa7
commit e9ed10d08c
4 changed files with 180 additions and 3 deletions
+9 -2
View File
@@ -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
}