Sign inSign up

lgatica/node-ssh

By lgatica

•Updated over 8 years ago

Docker image for node apps with alpine linux and private dependencies dependencies (git+ssh)

Image
0

50K+

lgatica/node-ssh repository overview

⁠node-ssh

dockeri.co

Build Status

Docker image for node apps with alpine linux and private dependencies dependencies (git+ssh)

Supported tags and respective Dockerfile links

⁠Variants

  • onbuild: Onbuild image to general node app
  • ci: Image for CI pipelines. Like gitlab-ci

⁠Create a Dockerfile in your Node.js app project

FROM lgatica/node-ssh:10-onbuild

EXPOSE 3000

You can then build and run the Docker image:

export KNOWN_HOST=gitlab.com
export SSH_PRIVATE_KEY=$(cat ssh/id_rsa)
docker build -t my-nodejs-app \
  --build-arg KNOWN_HOST=$KNOWN_HOST \
  --build-arg SSH_PRIVATE_KEY=$SSH_PRIVATE_KEY.
docker run -it --rm --name my-running-app my-nodejs-app

Change KNOWN_HOST and SSH_PRIVATE_KEY with valid values for install private dependencies.

⁠Notes

The image assumes that your application has a file named package.json listing its dependencies and defining its start script.

Tag summary

Content type

Image

Digest

Size

33.4 MB

Last updated

over 8 years ago

docker pull lgatica/node-ssh