Added docker-compose install.

Co-authored-by: jmhbnz <mail@jamesblair.net>
This commit is contained in:
daljitdokal
2021-01-20 18:17:43 +13:00
committed by Daljit Singh
parent 14bda35e09
commit 7eea9bb11b
3 changed files with 13 additions and 1 deletions

View File

@ -11,3 +11,8 @@ export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='valu
# Connect to the machine using ssh
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
# Install docker compose
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose"
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo chmod +x /usr/local/bin/docker-compose"

View File

@ -1,7 +1,9 @@
#!/bin/bash
# Step 5 - Teardown cloud resources
# The Google Cloud Platform resources created by this process come at a cost, so it's important we have an easy way to teardown those resources as soon as we're finished with them.
# The Google Cloud Platform resources created by this process come at a cost, so it's important we have an easy way to teardown those resources as soon as we're finished with them!
# The script below will delete any projects containing ~gitlab~ in the name along with any compute instances running in those projects.
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:

View File

@ -99,6 +99,11 @@ export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='valu
# Connect to the machine using ssh
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
# Install docker compose
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose"
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo chmod +x /usr/local/bin/docker-compose"
#+end_src