Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2
-
Upload
codefresh -
Category
Technology
-
view
38 -
download
0
Transcript of Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2
![Page 1: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/1.jpg)
Containers #101Building a micro-service using Node.js & Docker #2 Aug15
![Page 2: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/2.jpg)
About the meetup • A series of 30 min webinars + 10 min
Q&A• Hands On• Session are recorded• Suggested topics and presenters are
welcome
![Page 3: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/3.jpg)
About me • Developer, entrepreneur and
technology enthusiast• Live in the Silicon Valley since
2008 • Founder and CEO of Codefresh• Member of the Node.js foundation
@RazielTabib
![Page 4: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/4.jpg)
About codefresh • A Docker platform for development
teams.• Build, Run & Test Docker containers• On demand staging and testing
environments• Launch any PR, Commit or Branch in
seconds
@codefresh
![Page 5: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/5.jpg)
TerminologyDocker FileA recipe for Docker image Docker ImagesBlueprints of our applicationDocker ContainerCreated from docker images and are real instances of our applicationDocker DaemonBuilding, running and distributing Docker containersDocker ClientRun on our local machine and connect to the daemonDocker HubA registry of docker images
https://www.airpair.com/node.js/posts/getting-started-with-docker-for-the-nodejs-dev
![Page 6: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/6.jpg)
What we did last time
• Build a simple micro-service
ubuntu
Node.jsbase image
micro-service
micro-service
micro-service image
• Create base Docker image
• Run our micro-service inside a container• Create a Docker image from an existing container• Publish our image in Docker hub
Recording is available @https://vimeo.com/codefresh
![Page 7: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/7.jpg)
What we will see today
ubuntu
Node.jsbase image
• Create base Docker image using Docker file
FROM ubuntu:latestMAINTAINER [email protected]
#1 RUNRUN apt-get updateRUN apt-get install –y nodejs……..
Dockerfile
![Page 8: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/8.jpg)
What we will see today
• Build a simple micro-service
ubuntu
Node.js
micro-service
micro-service image
• Create base Docker image using Docker file
• Create new image with our microserviceFROM ubuntu:latestMAINTAINER [email protected]
#1 RUNRUN apt-get updateRUN apt-get install –y nodejs……..
#2 COPYCOPY . /src
….
Dockerfile
micro-service
![Page 9: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/9.jpg)
What we will see today
• Build a simple micro-service• Create base Docker image using Docker file
• Create new image with our micro service• Deploy to Digital Ocean
ubuntu
Node.js
micro-service
micro-service image
![Page 10: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/10.jpg)
Docker new toolbox
https://www.docker.com/toolbox
![Page 11: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/11.jpg)
What we saw today
• Build a simple micro-service• Create base Docker image using Docker file
• Create new image with our microservice• Deploy to Digital Ocean
ubuntu
Node.js
micro-service
micro-service image
![Page 12: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/12.jpg)
additional resources• Codefresh blog blog.codefresh.io• Containers #101 http://www.meetup.com/Containers-101-online-meetup/• Docker Online meetup (delivered by Docker) http://www.meetup.com/Docker-Online-Meetup/
@codefresh
![Page 13: Containers #101 Meetup: Building a micro-service using Node.js and Docker - Part #2](https://reader036.fdocuments.us/reader036/viewer/2022062401/58742fe01a28ab72188b7599/html5/thumbnails/13.jpg)
Questions?
Sign up to our beta @ www.codefresh.io
Recording available at:https://vimeo.com/137176494
@RazielTabib