docker-aosp icon indicating copy to clipboard operation
docker-aosp copied to clipboard

bash: run.sh: No such file or directory

Open ydc1992 opened this issue 9 years ago • 4 comments

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

ydc1992 avatar Jan 01 '17 04:01 ydc1992

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

kylemanna avatar Jan 01 '17 23:01 kylemanna

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

ydc1992 avatar Jan 02 '17 09:01 ydc1992

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.

kylemanna avatar Jan 02 '17 09:01 kylemanna

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

ydc1992 avatar Jan 02 '17 10:01 ydc1992