Installing pgcrypto on Postgresql Docker

I was getting an error from Postgresql where function get_random_uuid() does not exist. My Postgresql hosted on my Docker did not have the pgcrypto extension loaded. I ran the code below to enable pgcrypto.

Using PSQL or PgAdmin, connect to the DB and type

CREATE EXTENSION IF NOT EXISTS pgcrypto;