Member since
03-22-2016
7
Posts
2
Kudos Received
0
Solutions
04-01-2019
01:20 AM
Hi, let me advertise an option for git clone using git+ssh. I have put together a Docker image which supports git cloning using git+ssh out-of-the box. Give it a try and let me know how it works. Usage is as follows: docker run --name nifi-registry \
-p 18080:18080 \
-v ~/.ssh:/home/nifi/.ssh \
-e 'FLOW_PROVIDER=git' \
-e 'GIT_REMOTE_URL=git@github.com:michalklempa/docker-nifi-registry-example-flow.git' \
-e 'GIT_CHECKOUT_BRANCH=example' \
-e 'FLOW_PROVIDER_GIT_FLOW_STORAGE_DIRECTORY=/opt/nifi-registry/flow-storage-git' \
-e 'FLOW_PROVIDER_GIT_REMOTE_TO_PUSH=origin' \
-e 'GIT_CONFIG_USER_NAME=Michal Klempa' \
-e 'GIT_CONFIG_USER_EMAIL=michal.klempa@gmail.com' \
-d \
michalklempa/nifi-registry:latest or using ~/.ssh as a bind mount point: docker run --name nifi-registry \
-p 18080:18080 \
-e 'FLOW_PROVIDER=git' \
-e 'GIT_REMOTE_URL=git@github.com:michalklempa/docker-nifi-registry-example-flow.git' \
-e 'GIT_CHECKOUT_BRANCH=example' \
-e 'FLOW_PROVIDER_GIT_FLOW_STORAGE_DIRECTORY=/opt/nifi-registry/flow-storage-git' \
-e 'FLOW_PROVIDER_GIT_REMOTE_TO_PUSH=origin' \
-e 'GIT_CONFIG_USER_NAME=Michal Klempa' \
-e 'GIT_CONFIG_USER_EMAIL=michal.klempa@gmail.com' \
-e 'SSH_PRIVATE_KEY='$(base64 -w 0 < ~/.ssh/id_rsa) \
-e 'SSH_KNOWN_HOSTS='$(base64 -w 0 < ~/.ssh/known_hosts) \
-e 'SSH_PRIVATE_KEY_PASSPHRASE=' \
-d \
michalklempa/nifi-registry:latest
Using HTTPS is also supported: docker run --name nifi-registry \
-p 18080:18080 \
-e 'FLOW_PROVIDER=git' \
-e 'GIT_REMOTE_URL=https://github.com/michalklempa/docker-nifi-registry-example-flow.git' \
-e 'GIT_CHECKOUT_BRANCH=example' \
-e 'FLOW_PROVIDER_GIT_FLOW_STORAGE_DIRECTORY=/opt/nifi-registry/flow-storage-git' \
-e 'FLOW_PROVIDER_GIT_REMOTE_TO_PUSH=origin' \
-e 'FLOW_PROVIDER_GIT_REMOTE_ACCESS_USER=michalklempa' \
-e 'FLOW_PROVIDER_GIT_REMOTE_ACCESS_PASSWORD=thisisnotmypassword:)' \
-e 'GIT_CONFIG_USER_NAME=Michal Klempa' \
-e 'GIT_CONFIG_USER_EMAIL=michalklempa@gmail.com' \
-d \
michalklempa/nifi-registry:latest Full documentation available at github: https://github.com/michalklempa/docker-nifi-registry/#git-cloning-the-repository-at-startup and docker image on dockerhub: https://hub.docker.com/r/michalklempa/nifi-registry
... View more