- $ mkdir app
- $ cd app
npm init --y
npm install express
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => res.send('Hello Cloud Engineers from ECS services!'))
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
$ node index.js You should see your app at http://localhost:3000/:
docker login -u AWS -p $(aws ecr get-login-password --region us-east-1) 216952475463.dkr.ecr.us-east-1.amazonaws.com
docker build -t nashwan .
docker tag nashwan:latest 216952475463.dkr.ecr.us-east-1.amazonaws.com/nashwan:latest
docker push 216952475463.dkr.ecr.us-east-1.amazonaws.com/nashwan:latest