Search code examples
dockerappium

Docker invalid reference when using $(pwd) mac os


//Runs android sdk on container

docker run -it — rm -v $(pwd)/sdk:/sdk thyrlian/android-sdk bash -c 'cp -a $ANDROID_HOME/. /sdk'

Throws below error

docker: invalid reference format.
See 'docker run --help'.

Solution

  • What's the exact command you need to run in the interactive terminal?

    In your case,

    "- rm" is incorrect, there should no space between - and rm, so it should be -rm

    Secondly, it should be --rm and re try.

    docker run -it --rm -v $(pwd)/sdk:/sdk thyrlian/android-sdk bash -c 'cp -a $ANDROID_HOME/. /sdk'