Skip to content

Instantly share code, notes, and snippets.

@codeasashu
Created February 5, 2019 09:20
Show Gist options
  • Save codeasashu/9c5eaf1dcc0cdfeac9d1c4d32ef874be to your computer and use it in GitHub Desktop.
Save codeasashu/9c5eaf1dcc0cdfeac9d1c4d32ef874be to your computer and use it in GitHub Desktop.
Docker gotchas
#!/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