Skip to content

🐳 Docker image based on official node image with openssh and git installed

Notifications You must be signed in to change notification settings

pionl/docker-node-clone-ready

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image based on official node image with openssh and git installed

Pre-installed packages:

  • git and openssh-server for cloning support

Tags:

Image Badges
pionl/node-clone-ready:8
pionl/node-clone-ready:9
pionl/node-clone-ready:12
pionl/node-clone-ready:14
pionl/node-clone-ready:16
pionl/node-clone-ready:17
FROM pionl/node-clone-ready:8

Cloning/accessing private repository

Add to your Dockerfile

# Get the private keys to enbale pull from private repo
ARG ssh_prv_key
RUN test -n "$ssh_prv_key"


# Authorize SSH Host
RUN mkdir -p /root/.ssh/ && \
    chmod 0700 /root/.ssh/

# Add the keys and set permissions
RUN echo "$ssh_prv_key" > /root/.ssh/id_rsa

RUN chmod 600 /root/.ssh/id_rsa
RUN chown -R root:root /root/.ssh

## Do your stuff that requires id_rsa
## Then delete the keys to prevent keeping it in the repo by calling

RUN rm -rf /root/.ssh/

Pass desired id_rsa file when building image:

docker build -t TAG_NAME --build-arg ssh_prv_key="$(cat ~/.ssh/id_rsa)"

Contributions

  1. Install wf-docker
  2. Change the Dockerfile.template
  3. For new versions edit .wf-docker.json and wf-docker.tags property
  4. Use wf-docker build to build image

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

🐳 Docker image based on official node image with openssh and git installed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published