Comments (14)
Putting them in /root/.ssh
on the container should work. Something like this might work:
docker run -v "$PWD":/var/task -v "$HOME/.ssh":/root/.ssh lambci/lambda:build-nodejs4.3 npm install
You can play around manually in the container and see what works:
docker run -it lambci/lambda:build-nodejs4.3 bash
Or this if you want to expose your own .ssh directory in the container:
docker run -v "$HOME/.ssh":/root/.ssh -it lambci/lambda:build-nodejs4.3 bash
from docker-lambda.
Wow so helpful thank you! @mhart
from docker-lambda.
@pierrerappolt no probs, did that solve your problem?
from docker-lambda.
I'm getting this error at the moment
npm ERR! /root/.ssh/config: line 2: Bad configuration option: addkeystoagent
npm ERR! /root/.ssh/config: line 3: Bad configuration option: usekeychain
npm ERR! /root/.ssh/config: terminating, 2 bad configuration options
from docker-lambda.
I tried changing my ~/.ssh/config file to
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile /root/.ssh/id_rsa
but still no luck
from docker-lambda.
@pierrerappolt right, they're probably macOS-specific settings that don't work on Linux.
Might be best just to connect the files you need then instead of the whole .ssh
directory
from docker-lambda.
@mhart Is there a way I can run npm install
from within bash?
from docker-lambda.
I am able to create new working github permissions within bash but then can't run npm install
from docker-lambda.
Not sure what you mean? What happens when you run npm install?
from docker-lambda.
@mhart
after doing:
docker run -v "$HOME/.ssh":/root/.ssh -it lambci/lambda:build-nodejs4.3 bash
no such file or directory, open '/var/task/package.json'
from docker-lambda.
bash-4.2# npm install
in between those
from docker-lambda.
Right – so the -v
option to docker is used to expose your local directories on the docker container. So you'll need -v "$PWD":/var/task
if you want to expose your (current) project directory
from docker-lambda.
@mhart Doh! Solved! Thank you so much!
from docker-lambda.
No probs, glad it worked for you 👍
from docker-lambda.
Related Issues (20)
- Missing files from provided.al2 HOT 1
- Need support for python3.9 HOT 10
- nodejs16.x support HOT 6
- Golang update to 1.17 HOT 1
- Is java11 image on AL2 and Corretto?
- How can I build image for python3.9 runtime? HOT 4
- Help with Debugging Go Lambda HOT 1
- Rebuild images? HOT 2
- What is the status of this project? HOT 7
- Make `myfunction` and `9001` configurable?
- Support for Node 14.x? HOT 1
- Boto3 and botocore need upgrading HOT 5
- Require image for ARM64 architecture
- Support for .NET 6
- Multi-arch support specially arm64 HOT 1
- Current ruby release (v2.7.2p137) out of date (now v2.7.6p?) HOT 1
- Missing .py file causing attributeError on lambda
- Jenkins agent install on lambci/lambda:build-python3.7 HOT 2
- Debugging with Pycharm
- [Question] Support for Provided Runtimes (Namely C++)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-lambda.