I am trying to configure the deployment of a Node.js service using Docker.
The Dockerfile that I have is compiled from various examples from the web. The Dockerfile directory includes:
This is the Docker file:
FROM ubuntu:13.10 # make sure apt is up to date RUN apt-get update # install npm, git, ssh, curl RUN apt-get install -y npm git git-core ssh curl RUN mkdir /nodejs && curl http:
After the setup is complete, start.sh starts up, and I have problems with the private NPM dependency, which are in the private Node.js. This is what start.sh does:
cd /tmp
There is one closed module in package.json for ExampleRepo, which we import as follows:
"dependencies": { "scribe": "git+ssh:// git@github.com :Company/PrivateDep.git" },
When npm install goes to this repo, it outputs these logs:
npm ERR! git clone git@github.com :InboxAppCo/scribe.git Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-InboxAppCo-scribe-git-abae334a'... npm ERR! git clone git@github.com :InboxAppCo/scribe.git npm ERR! git clone git@github.com :InboxAppCo/scribe.git Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts. npm ERR! git clone git@github.com :InboxAppCo/scribe.git Permission denied (publickey). npm ERR! git clone git@github.com :InboxAppCo/scribe.git fatal: Could not read from remote repository. npm ERR! git clone git@github.com :InboxAppCo/scribe.git npm ERR! git clone git@github.com :InboxAppCo/scribe.git Please make sure you have the correct access rights npm ERR! git clone git@github.com :InboxAppCo/scribe.git and the repository exists. npm ERR! Error: `git "clone" "--mirror" " git@github.com :InboxAppCo/scribe.git" "/root/.npm/_git-remotes/git-github-com-InboxAppCo-scribe-git-abae334a"` failed with 128 npm ERR! at ChildProcess.cpclosed (/usr/share/npm/lib/utils/exec.js:59:20) npm ERR! at ChildProcess.EventEmitter.emit (events.js:98:17) npm ERR! at Process.ChildProcess._handle.onexit (child_process.js:789:12) npm ERR! If you need help, you may report this log at: npm ERR! <http://bugs.debian.org/npm> npm ERR! or use npm ERR! reportbug --attach /tmp/MediaFX/npm-debug.log npm npm ERR! System Linux 3.16.4-tinycore64 npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! cwd /tmp/MediaFX npm ERR! node -v v0.10.15 npm ERR! npm -v 1.2.18
I thought that since the git clone of the private Node service is working fine, any of its private NPM dependencies will be smoothly installed.
I am pretty sure that my SSH is not configured correctly (and that it did not prove itself, and git cloned the repo to private parents) because I added the username and password to the link. However, I am not sure and would appreciate some advice on how to do this correctly.
source share