Skip to content

Instantly share code, notes, and snippets.

@juhamust
Last active September 16, 2017 15:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juhamust/fc7fcbe75cafc72f0141 to your computer and use it in GitHub Desktop.
Save juhamust/fc7fcbe75cafc72f0141 to your computer and use it in GitHub Desktop.
NPM + Private Bitbucket Repo + Docker
# NOTE: Copy id_rsa.pub content to Bitbucket project Deployment keys
Host bitbucket.org
StrictHostKeyChecking no
IdentityFile /app/.ssh/id_rsa
# Copy files from repository into container
RUN chmod 700 /app/.ssh ; chown -R app.app /app
COPY deploy/ssh/* /app/.ssh/
{
"name": "myproject",
"dependencies": {
"mymod": "git+ssh://git@bitbucket.org/SC5/mymod"
}
}
@juhamust
Copy link
Author

juhamust commented Mar 5, 2015

NPM can install dependencies from private Bitbucket repo within Docker container, but there are few gotchas on the way: Idea is to create a custom private/public key pair and put it in version control of the project: If person has an access to the project, also access to its dependency is expected.

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