- git and openssh-server for cloning support
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
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)"
- Install wf-docker
- Change the
Dockerfile.template
- For new versions edit
.wf-docker.json
andwf-docker.tags
property - Use
wf-docker build
to build image
This project is licensed under the MIT License - see the LICENSE.md file for details.