Last active
August 21, 2021 02:51
-
-
Save qtangs/69e0db74313e8b97708b88f9a7db9bfb to your computer and use it in GitHub Desktop.
Get packages for AWS Lambda Layer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 acd
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?