kylemanna / docker-aosp

🏗 Minimal Android AOSP build environment with handy automation wrapper scripts
https://registry.hub.docker.com/u/kylemanna/aosp/
MIT License
507 stars 239 forks source link

bash: run.sh: No such file or directory #17

Open ydc1992 opened 7 years ago

ydc1992 commented 7 years ago

My Operation is Windows 10, Use DockerToolbox,It's say run.sh cann't find

$ ./build-kitkat.sh
+ '[' '' = docker ']'
+ aosp_url=https://raw.githubusercontent.com/kylemanna/docker-aosp/master/utils/aosp
+ args='bash run.sh docker'
+++ dirname ./build-kitkat.sh
++ cd .
++ pwd -P
++ basename ./build-kitkat.sh
+ export 'AOSP_EXTRA_ARGS=-v /f/kitkat/build-kitkat.sh:/usr/local/bin/run.sh:ro'
+ AOSP_EXTRA_ARGS='-v /f/kitkat/build-kitkat.sh:/usr/local/bin/run.sh:ro'
+ export AOSP_IMAGE=kylemanna/aosp:4.4-kitkat
+ AOSP_IMAGE=kylemanna/aosp:4.4-kitkat
+ '[' -n '' ']'
+ '[' -x ../utils/aosp ']'
++ type -P aosp
+ '[' -n /usr/local/bin/aosp ']'
+ aosp bash run.sh docker
aosp: Checking if /f/kitkat/aosp exists
aosp: Checking if /f/kitkat/aosp exists - ok
aosp: Checking if /f/kitkat/ccache exists
aosp: Checking if /f/kitkat/ccache exists - ok

bash: run.sh: No such file or directory
kylemanna commented 7 years ago

Looks like a problem with mapping the file via a volume in to the Docker container.

Where are you running build-kitkat.sh from?

What's the output from:

docker run --rm -it -v $PWD/build-kitkat.sh:/usr/local/bin/run.sh:ro kylemanna/aosp ls -l /usr/local/bin/run.sh

Or in your case:

docker run --rm -it -v /f/kitkat/build-kitkat.sh:/usr/local/bin/run.sh:ro kylemanna/aosp ls -l /usr/local/bin/run.sh
ydc1992 commented 7 years ago

This is output

$ docker run --rm -it -v /f/kitkat/build-kitkat.sh:/usr/local/bin/run.sh:ro kylemanna/aosp ls -l /usr/local/bin/run.sh
docker_entrypoint: Creating user UID/GID [1000/1000]
docker_entrypoint: Creating user UID/GID [1000/1000] - done
docker_entrypoint: Copying .gitconfig and .ssh/config to new user home
docker_entrypoint: Copying .gitconfig and .ssh/config to new user home - done
docker_entrypoint: Creating /tmp/ccache and /aosp directory
docker_entrypoint: Creating /tmp/ccache and /aosp directory - done

total 0

docker image

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
kylemanna/aosp      latest              2e76de8553e4        2 hours ago         975.8 MB
kylemanna commented 7 years ago

Looks like a problem with Docker Tooolbox on windows. It seems that it can't do the volume mount described by -v /f/kitkat/build-kitkat.sh:/usr/local/bin/run.sh:ro.

Not sure if there is anything we can do to fix that other then bring it upstream to the Docker Windows Toolbox people. Is Docker Toolbox all up to date? This seems like a bug that would have burned others.

ydc1992 commented 7 years ago

May Be! Whether I can mount a dir storage the source and On container get build-kitkat.sh,run build-kitkat.sh docker