Skip to content

Instantly share code, notes, and snippets.

View roujdami's full-sized avatar
🎯
I may be slow to respond.

Hamza El-Ghoujdami roujdami

🎯
I may be slow to respond.
  • Google
  • Montreal, Canada
View GitHub Profile

Useful commands line

$ terraform plan                      # plan
$ terraform apply                     # shortcut for plan & apply - avoid this in production
$ terraform plan -out out.terraform   # terraform plan and write the plan to out file
$ terraform apply out.terraform       # apply terraform plan using out file
$ terraform show                      # show current state
$ cat terraform.tfstate               # show state in JSON format
python -v
wget the_archive_file here https://cloud.google.com/sdk/docs/quickstart-macos#before-you-begin
unzip the_archive_file
./google-cloud-sdk/install.sh

gcloud init
gcloud auth list
gcloud config list

Basics

docker ps                      // Show running docker containers 
docker ps -a                   // Show all containers, both stopped and running
docker ps -n x                 // Shows the last x containers, running or stopped, ex: docker ps -n 5)
docker ps -l

docker images