Created
February 5, 2019 09:20
-
-
Save codeasashu/9c5eaf1dcc0cdfeac9d1c4d32ef874be to your computer and use it in GitHub Desktop.
Docker gotchas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Below script allows to fetch private github/gitlab repo | |
## Assume, $PRIVATE_SSH = | |
## -----BEGIN OPENSSH PRIVATE KEY----- | |
## b3BlbnNzaC1rZXktdjEAAAAABG5..... | |
cat > /root/.ssh/id_rsa <<EOF | |
-----BEGIN OPENSSH PRIVATE KEY----- | |
b3BlbnNzaC1rZXktdjEAAAAABG5..... | |
..... | |
-----END OPENSSH PRIVATE KEY----- | |
EOF | |
touch /root/.ssh/known_hosts | |
ssh-keyscan gitlab.com >> /root/.ssh/known_hosts | |
chmod 400 $HOME/.ssh/id_rsa | |
composer update -d /usr/src/consumer | |
<your-command> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment