diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 855e3fc88..2ac04e551 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,9 @@ image: termux/package-builder:latest -variables: - ANDROID_HOME: "/home/builder/lib/android-sdk" - NDK: "/home/builder/lib/android-ndk" - stages: - build - deploy -before_script: - - cp -a /home/builder/.android $HOME/.android - - chown -R $(id -u):$(id -g) $HOME/.android - ## Common configuration for all build jobs. .job_template: &build_job stage: build diff --git a/scripts/run-docker.sh b/scripts/run-docker.sh index 8274135f9..74b3d95e9 100755 --- a/scripts/run-docker.sh +++ b/scripts/run-docker.sh @@ -20,28 +20,27 @@ echo "Running container '$CONTAINER_NAME' from image '$IMAGE_NAME'..." docker start $CONTAINER_NAME > /dev/null 2> /dev/null || { echo "Creating new container..." docker run \ - --detach \ - --env HOME=$HOME \ - --name $CONTAINER_NAME \ - --volume $REPOROOT:$HOME/termux-packages \ - --tty \ - $IMAGE_NAME + --detach \ + --name $CONTAINER_NAME \ + --volume $REPOROOT:$HOME/termux-packages \ + --tty \ + $IMAGE_NAME if [ "$UNAME" != Darwin ]; then if [ $(id -u) -ne 1000 -a $(id -u) -ne 0 ] then - echo "Changed builder uid/gid... (this may take a while)" - docker exec --tty $CONTAINER_NAME chown -R $(id -u) $HOME - docker exec --tty $CONTAINER_NAME chown -R $(id -u) /data - docker exec --tty $CONTAINER_NAME usermod -u $(id -u) builder - docker exec --tty $CONTAINER_NAME groupmod -g $(id -g) builder + echo "Changed builder uid/gid... (this may take a while)" + docker exec --tty $CONTAINER_NAME chown -R $(id -u) $HOME + docker exec --tty $CONTAINER_NAME chown -R $(id -u) /data + docker exec --tty $CONTAINER_NAME usermod -u $(id -u) builder + docker exec --tty $CONTAINER_NAME groupmod -g $(id -g) builder fi fi } if [ "$#" -eq "0" ]; then - docker exec --interactive --tty --user $USER $CONTAINER_NAME bash + docker exec --interactive --tty $CONTAINER_NAME bash else - docker exec --interactive --tty --user $USER $CONTAINER_NAME $@ + docker exec --interactive --tty $CONTAINER_NAME $@ fi