Last active
October 8, 2019 05:30
-
-
Save masuidrive/0f0fac6f2e215804f8d4e8ea6f794b40 to your computer and use it in GitHub Desktop.
Docker, NodeとRubyの開発環境作り
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RUBY_VERSION=2.6.3 | |
NODE_VERSION=12 | |
# install docker | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update | |
sudo apt install -y docker-ce docker-compose | |
ME=`whoami` | |
sudo usermod -aG docker $ME | |
# install node | |
sudo apt install -y curl | |
curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | sudo -E bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt update | |
sudo apt -y install nodejs yarn | |
# install ruby | |
sudo apt -y install build-essential git-core zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev | |
( \ | |
curl -L http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-$RUBY_VERSION.tar.gz | tar xvfz - -C /tmp && \ | |
cd /tmp/ruby-2.6.3/ && \ | |
./configure && \ | |
make && \ | |
sudo make install && \ | |
/usr/local/bin/ruby -v && \ | |
rm -Rf /tmp/ruby-$RUBY_VERSION \ | |
) | |
sudo npm -g install prettier eslint | |
sudo gem install rubocop bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment