Most of these scripts are run as sudo.
Example:
curl -L "https://gist.github.com/yogendra/7d23440d2d139cf8d426/raw/setup-ubuntu-docker.sh" | sudo bash
Or
wget -qO- "https://gist.github.com/yogendra/7d23440d2d139cf8d426/raw/setup-ubuntu-docker.sh" | sudo bash