Skip to content

Instantly share code, notes, and snippets.

@okunishinishi
Last active June 21, 2017 16:17
Show Gist options
  • Save okunishinishi/755414fd42d74bd2eaf6106d4238b2c5 to your computer and use it in GitHub Desktop.
Save okunishinishi/755414fd42d74bd2eaf6106d4238b2c5 to your computer and use it in GitHub Desktop.
Node.js and Docker on AWS EC2
#!/bin/bash
## Install docker on AWS
### See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
## Instal Node.js
### See https://github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
PROFILE=~/.bash_profile
echo '# NVM Setting' >> ${PROFILE}
echo 'export NVM_DIR="$HOME/.nvm"' >> ${PROFILE}
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" ' >> ${PROFILE}
source ${PROFILE}
nvm install 7
nvm use 7
nvm alias default node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment