Building from Source

Length: 00:10:07

Lesson Summary:

This lecture explains how to install and configure all the prerequisites necessary to build our sample application from source code.

To install on Amazon Linux 2:

sudo yum update

sudo yum install docker

sudo service docker start
sudo usermod -a -G docker $USER

# log out and back in

# set up Node.js https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash

. ~/.nvm/nvm.sh

nvm install 6

node -e "console.log('Running Node.js ' + process.version)"

sudo amazon-linux-extras install golang1.11

go version

git clone https://github.com/linuxacademy/ecs-deep-dive-2018

cd ecs-deep-dive-2018/picture-upload/

make install

# You will see some warnings about `SKIPPING OPTIONAL DEPENDENCY` and deprecated modules. These can be safely ignored.

# Install docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

# make sure you're in ~/ecs-deep-dive-2018/picture-upload

# edit docker-compose.yml, setting the AWS_ACCESS_KEY_ID, AWS_REGION, and AWS_SECRET_ACCESS_KEY values 

docker-compose up


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More