https://github.com/pionl/docker-node-clone-ready
🐳 Docker image based on official node image with openssh and git installed
https://github.com/pionl/docker-node-clone-ready
docker docker-image git nodejs openssh-server
Last synced: about 2 months ago
JSON representation
🐳 Docker image based on official node image with openssh and git installed
- Host: GitHub
- URL: https://github.com/pionl/docker-node-clone-ready
- Owner: pionl
- Created: 2018-03-27T17:26:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-17T13:13:24.000Z (over 4 years ago)
- Last Synced: 2025-02-27T04:47:42.942Z (over 1 year ago)
- Topics: docker, docker-image, git, nodejs, openssh-server
- Language: Dockerfile
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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** | 
```docker
FROM pionl/node-clone-ready:8
```
## Cloning/accessing private repository
Add to your Dockerfile
```docker
# 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:
```bash
docker build -t TAG_NAME --build-arg ssh_prv_key="$(cat ~/.ssh/id_rsa)"
```
## Contributions
1. Install [wf-docker](https://github.com/wrk-flow/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](LICENSE.md) file for details.