Skip to content

Instantly share code, notes, and snippets.

@yihyang
Last active July 6, 2018 04:26
Show Gist options
  • Select an option

  • Save yihyang/0186b3b0817f8ea4f0014ea3380e661a to your computer and use it in GitHub Desktop.

Select an option

Save yihyang/0186b3b0817f8ea4f0014ea3380e661a to your computer and use it in GitHub Desktop.
Docker Cloud9 Setup Script, run it using
# run it using bash <(curl https://gist.githubusercontent.com/yihyang/0186b3b0817f8ea4f0014ea3380e661a/raw)
##########
# docker #
##########
# setup docker
docker run -it -d -p 80:80 kdelfour/cloud9-docker
########
# ruby #
########
# install the dependencies required for rbenv and Ruby
sudo apt-get -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
# install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
# adding PATH
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# source the installed rbenv
source ~/.bashrc
# install ruby version
rbenv install 2.5.1
rbenv global 2.5.1
#########
# NGINX #
#########
# install nginx
sudo apt-get update
sudo apt-get -y install nginx
# allowing nginx http access
sudo ufw allow 'Nginx HTTP'
systemctl status nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment