Skip to content

Instantly share code, notes, and snippets.

Last active August 21, 2021 02:51
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save qtangs/69e0db74313e8b97708b88f9a7db9bfb to your computer and use it in GitHub Desktop.
Get packages for AWS Lambda Layer
export PKG_DIR="python"
rm -rf ${PKG_DIR} && mkdir -p ${PKG_DIR}
docker run --rm -v $(pwd):/foo -w /foo lambci/lambda:build-python3.6 \
pip install -r requirements.txt --no-deps -t ${PKG_DIR}
Copy link

Thank you so much for this script!

I've tried quotes and no quotes around $(pwd). I also tried writing the file path to my current working directory in to the script and adding a cd to the correct directory at the beginning.

However, I keep getting the same result --
docker: Error response from daemon: the working directory 'C:/Program Files/Git/foo' is invalid, it needs to be an absolute path.

I'm running the script from inside Git Bash on Windows 10. Any thoughts on what I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment