Browse Source

Bootrstrapping androix repositoy in lite Dockerfile done right

non-interactive-preview-wip
Shagen Ogandzhanian 4 years ago
parent
commit
ed495ea09e
  1. 2
      ci/docker/compose-web/Dockerfile-Basic
  2. 14
      ci/docker/compose-web/bootstrap.sh
  3. 5
      ci/docker/compose-web/init.gradle

2
ci/docker/compose-web/Dockerfile-Basic

@ -47,3 +47,5 @@ WORKDIR androidx-main
COPY bootstrap.sh bootstrap.sh
RUN chmod a+x bootstrap.sh
ENTRYPOINT ./bootstrap.sh

14
ci/docker/compose-web/bootstrap.sh

@ -1,3 +1,6 @@
#!/bin/bash
function bootstrap() {
cd /androidx-main
~/bin/repo init -u https://android.googlesource.com/platform/manifest \
-b androidx-main --depth=1 --partial-clone --clone-filter=blob:limit=10M
@ -7,3 +10,14 @@ mkdir -p /mnt/agent
ln -sf /androidx-main/tools/ /mnt/agent/tools
ln -sf /androidx-main/prebuilts/ /mnt/agent/prebuilts
ln -sf /androidx-main/external /mnt/agent/external
}
if [ ! -e /tmp/init ]; then
touch /tmp/init
echo "bootstrapping"
sleep 10
else
echo "not bootstrapping, all done"
fi
/bin/bash

5
ci/docker/compose-web/init.gradle

@ -76,9 +76,4 @@ allprojects {
url("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}
task bootstrap(type: Exec) {
workingDir "/androidx-main"
commandLine "/androidx-main/bootstrap.sh"
}
}

Loading…
Cancel
Save