SlideShare una empresa de Scribd logo
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 1
This documentation explains step by step how to Build, Deploy and Run Node.js application on
Azure using docker.
The following Source code will be used as test and can be checked from here.
Requirements:-
• Azure Account (Sign up for a free $200 credit)
• Git (Install on the computer)
• Docker (Install on the computer)
• Node.js (you can use the above link to clone the code).
Let’s work !!!
Step #1:-
After logging to the Azure account, as initial step we must create something called container
registry ( ACR will be used later as refer to Azure container Registry) which allows you to store
your custom container images privately in the Azure cloud.
Access to azure portal from the following link :- https://portal.azure.com/
Figure 1 Create container Registry
Then After access the container registry page, press add
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 2
Figure 2 add ACR Screen
And fill the information depends on the requirement you have.
Figure 3 Create ACR
And Press create.
Wait for couple of second/minute till it will be created, azure will notify you (Notification
section) once it’s completed.
Step #2:-
Once the ACR will be created, press on it, and it will take you to the information about the
created ACR, the following information will be needed later.
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 3
Figure 4 ACR Login information
Step #3:-
We need to check the docker login, open Power shell/terminal depends on operating system
you are using, to authenticate to ACR and validate the credentials.
Figure 5 Test docker Login using ACR information
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 4
Figure 6 Test Result, Login Succeeded
You should see a message that says, “login succeeded”. As Figure 6.
Step #4:-
We need to clone the sample code from
https://bitbucket.org/network-international/node-js-getting-started/src/master/
Git command should be installed, to do this just press on this link here.
Fire the below command on the PowerShell/terminal/command promote.
git clone https://github.com/heroku/node-js-getting-started.git
Figure 7 Using Git to clone the code
After you've cloned the repo, switch into the application directory:
You will find files, create file call it Dockerfile (without any extension).
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 5
Figure 8 Dockerfile inside cloned repo
Inside the file write the following :-
Descriptions : -
• FROM node:alpine, The FROM command defines the base container image, and the
operating system will be Alpine Linux.
• WORKDIR /usr/app define the working directory and is where we'll store the application
code and if it’s not exists on the OS will be created during the process.
• COPY package*.json ./ used during the build process to add the package.json and
package-lock.json files to the working directory.
• RUN npm install used to execute npm install which will ensure our application
dependencies are included within the container image.
• COPY . . this is to copy the application source files into the working directory.
• CMD ["npm", "start"] defines the default command to execute when the container
starts.
Step #5:-
To do this step, you should be in the same directory as the Dockerfile. Use the docker build
command to create your container image, the below command will tell Docker to build your
image using the Dockerfile in the current directory.
FROM node:alpine
WORKDIR /usr/app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm", "start"]
docker build -t demonetwork.azurecr.io/node-docker-demo:latest .
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 6
Figure 9 Build docker image using dockerfile
Step #6:-
Now we test the login to our docker before, let’s push our image to ACR using the below
command,
Figure 10 Push the docker Image to ACR
docker push demonetwork.azurecr.io/node-docker-demo:latest
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 7
Figure 11 Pushing the docker image completed
After the command completes successfully, you can head back to the Azure portal to verify that
your image is now available in ACR.
Figure 12 Verify the command
Step #7:-
The final step, which is expose the docker application using URL, Azure make this step easy, by
creating resource called Web App for containers, to do this just follow the below figures.
In the Azure portal, select Create a resource, select Web in the Azure Marketplace, and choose
Web App for containers.
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 8
Figure 13 Create web app for containers
Press on web app for containers
Figure 14 Create Web App for containers
New page will be open, fill the information, such as the name of instance, will be publish either
on Linux or docker container ( our case) , don’t press review + create, press Next: Docker, so you
will be able to configure the web app.
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 9
Figure 15 Web App Instance details
The next screen, which is docker, as you see, I choose “ azure container Registry” and from the
drop list, will be appeared our options.
Figure 16 web app container configuration
Press review creates.
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 10
Figure 17 Web App Summary Page
Wait for couple of seconds and it will be created.
Figure 18 Final Result with URL for the new deployed code
As you see if you check the URL and press on it
This is the result.
https://networktask.azurewebsites.net
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa P a g e | 11

Más contenido relacionado

La actualidad más candente

SELENIUM SCRIPTS FOR DASHBOARD UI
SELENIUM SCRIPTS FOR DASHBOARD UISELENIUM SCRIPTS FOR DASHBOARD UI
SELENIUM SCRIPTS FOR DASHBOARD UI
Manasa Dilipkumar
 
Java – azure integration
Java – azure integrationJava – azure integration
Java – azure integration
pramajaya
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
Takayoshi Tanaka
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
Stefan Scherer
 
Troubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server ConfigurationTroubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server Configuration
ArchanaDeviKapaliVij
 
SDAccel Design Contest: How to use SDAccel on AWS
SDAccel Design Contest: How to use SDAccel on AWSSDAccel Design Contest: How to use SDAccel on AWS
SDAccel Design Contest: How to use SDAccel on AWS
NECST Lab @ Politecnico di Milano
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
Billy Korando
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
David Douglas
 
Jenkins Setup Document
Jenkins Setup DocumentJenkins Setup Document
Jenkins Setup Document
mobi fly
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
PolyglotMeetups
 
Ionic2
Ionic2Ionic2
Ionic2
Jiayun Zhou
 
New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10
Takayoshi Tanaka
 
ApppiumDoc_version2015
ApppiumDoc_version2015ApppiumDoc_version2015
ApppiumDoc_version2015
Amit DEWAN
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.
Dhaval Dalal
 
Docker on Windows - 101 to Production (half-day workshop)
Docker on Windows - 101 to Production (half-day workshop)Docker on Windows - 101 to Production (half-day workshop)
Docker on Windows - 101 to Production (half-day workshop)
Elton Stoneman
 
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,..."Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
LCloud
 
Php ppt
Php pptPhp ppt
Php ppt
ankitankesh
 

La actualidad más candente (17)

SELENIUM SCRIPTS FOR DASHBOARD UI
SELENIUM SCRIPTS FOR DASHBOARD UISELENIUM SCRIPTS FOR DASHBOARD UI
SELENIUM SCRIPTS FOR DASHBOARD UI
 
Java – azure integration
Java – azure integrationJava – azure integration
Java – azure integration
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
 
Troubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server ConfigurationTroubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server Configuration
 
SDAccel Design Contest: How to use SDAccel on AWS
SDAccel Design Contest: How to use SDAccel on AWSSDAccel Design Contest: How to use SDAccel on AWS
SDAccel Design Contest: How to use SDAccel on AWS
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
 
Unity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 pluginUnity and Azure Mobile Services using Prime31 plugin
Unity and Azure Mobile Services using Prime31 plugin
 
Jenkins Setup Document
Jenkins Setup DocumentJenkins Setup Document
Jenkins Setup Document
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
 
Ionic2
Ionic2Ionic2
Ionic2
 
New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10
 
ApppiumDoc_version2015
ApppiumDoc_version2015ApppiumDoc_version2015
ApppiumDoc_version2015
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.
 
Docker on Windows - 101 to Production (half-day workshop)
Docker on Windows - 101 to Production (half-day workshop)Docker on Windows - 101 to Production (half-day workshop)
Docker on Windows - 101 to Production (half-day workshop)
 
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,..."Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
 
Php ppt
Php pptPhp ppt
Php ppt
 

Similar a Build, Deploy and Run Node Js Application on Azure using Docker

Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s
Ranjeet Bhargava
 
Build containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdfBuild containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdf
Hamida Rebai Trabelsi
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote Conference
Hamida Rebai Trabelsi
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
kesavan N B
 
docker.docx
docker.docxdocker.docx
docker.docx
ssuser97943d
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
Paras Jain
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
Evoke Technologies
 
Getting started docker notes
Getting started docker notesGetting started docker notes
Getting started docker notes
AJAY NAYAK
 
Code and Deploy Angular to the Cloud
Code and Deploy Angular to the CloudCode and Deploy Angular to the Cloud
Code and Deploy Angular to the Cloud
Simona Cotin
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
B14870 solution final
B14870 solution finalB14870 solution final
B14870 solution final
ssuser8f0495
 
Overview of Docker
Overview of DockerOverview of Docker
Overview of Docker
GauranG Bajpai
 
Docker
DockerDocker
How to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorialHow to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorial
Katy Slemon
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
GDSC UofT Mississauga
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
JasonStraughan1
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
inside-BigData.com
 
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaSDCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
dchq
 
What Is AWS Elastic Kubernetes Service
 What Is AWS Elastic Kubernetes Service What Is AWS Elastic Kubernetes Service
What Is AWS Elastic Kubernetes Service
AMELIAOLIVIA2
 
Azure workshop
Azure workshopAzure workshop
Azure workshop
Wei-Ting Kuo
 

Similar a Build, Deploy and Run Node Js Application on Azure using Docker (20)

Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s
 
Build containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdfBuild containerized application using Docker and Azure.pdf
Build containerized application using Docker and Azure.pdf
 
Rome .NET Conference 2024 - Remote Conference
Rome .NET Conference 2024  - Remote ConferenceRome .NET Conference 2024  - Remote Conference
Rome .NET Conference 2024 - Remote Conference
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
docker.docx
docker.docxdocker.docx
docker.docx
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
 
Getting started docker notes
Getting started docker notesGetting started docker notes
Getting started docker notes
 
Code and Deploy Angular to the Cloud
Code and Deploy Angular to the CloudCode and Deploy Angular to the Cloud
Code and Deploy Angular to the Cloud
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
B14870 solution final
B14870 solution finalB14870 solution final
B14870 solution final
 
Overview of Docker
Overview of DockerOverview of Docker
Overview of Docker
 
Docker
DockerDocker
Docker
 
How to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorialHow to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorial
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaSDCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
 
What Is AWS Elastic Kubernetes Service
 What Is AWS Elastic Kubernetes Service What Is AWS Elastic Kubernetes Service
What Is AWS Elastic Kubernetes Service
 
Azure workshop
Azure workshopAzure workshop
Azure workshop
 

Más de Osama Mustafa

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architect
Osama Mustafa
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
Osama Mustafa
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
Osama Mustafa
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
Osama Mustafa
 
DevOps Project
DevOps Project DevOps Project
DevOps Project
Osama Mustafa
 
Java business service
Java business serviceJava business service
Java business service
Osama Mustafa
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_services
Osama Mustafa
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single node
Osama Mustafa
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...
Osama Mustafa
 
Weblogic and docker
Weblogic and dockerWeblogic and docker
Weblogic and docker
Osama Mustafa
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
Osama Mustafa
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
Osama Mustafa
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation
Osama Mustafa
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
Osama Mustafa
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
Osama Mustafa
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
Osama Mustafa
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.
Osama Mustafa
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
Osama Mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2
Osama Mustafa
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
Osama Mustafa
 

Más de Osama Mustafa (20)

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architect
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
DevOps Project
DevOps Project DevOps Project
DevOps Project
 
Java business service
Java business serviceJava business service
Java business service
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_services
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single node
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...
 
Weblogic and docker
Weblogic and dockerWeblogic and docker
Weblogic and docker
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
 
Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.Upgrade EBS DB from 11g to 12c.
Upgrade EBS DB from 11g to 12c.
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
 

Último

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 

Último (20)

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 

Build, Deploy and Run Node Js Application on Azure using Docker

  • 1. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 1 This documentation explains step by step how to Build, Deploy and Run Node.js application on Azure using docker. The following Source code will be used as test and can be checked from here. Requirements:- • Azure Account (Sign up for a free $200 credit) • Git (Install on the computer) • Docker (Install on the computer) • Node.js (you can use the above link to clone the code). Let’s work !!! Step #1:- After logging to the Azure account, as initial step we must create something called container registry ( ACR will be used later as refer to Azure container Registry) which allows you to store your custom container images privately in the Azure cloud. Access to azure portal from the following link :- https://portal.azure.com/ Figure 1 Create container Registry Then After access the container registry page, press add
  • 2. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 2 Figure 2 add ACR Screen And fill the information depends on the requirement you have. Figure 3 Create ACR And Press create. Wait for couple of second/minute till it will be created, azure will notify you (Notification section) once it’s completed. Step #2:- Once the ACR will be created, press on it, and it will take you to the information about the created ACR, the following information will be needed later.
  • 3. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 3 Figure 4 ACR Login information Step #3:- We need to check the docker login, open Power shell/terminal depends on operating system you are using, to authenticate to ACR and validate the credentials. Figure 5 Test docker Login using ACR information
  • 4. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 4 Figure 6 Test Result, Login Succeeded You should see a message that says, “login succeeded”. As Figure 6. Step #4:- We need to clone the sample code from https://bitbucket.org/network-international/node-js-getting-started/src/master/ Git command should be installed, to do this just press on this link here. Fire the below command on the PowerShell/terminal/command promote. git clone https://github.com/heroku/node-js-getting-started.git Figure 7 Using Git to clone the code After you've cloned the repo, switch into the application directory: You will find files, create file call it Dockerfile (without any extension).
  • 5. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 5 Figure 8 Dockerfile inside cloned repo Inside the file write the following :- Descriptions : - • FROM node:alpine, The FROM command defines the base container image, and the operating system will be Alpine Linux. • WORKDIR /usr/app define the working directory and is where we'll store the application code and if it’s not exists on the OS will be created during the process. • COPY package*.json ./ used during the build process to add the package.json and package-lock.json files to the working directory. • RUN npm install used to execute npm install which will ensure our application dependencies are included within the container image. • COPY . . this is to copy the application source files into the working directory. • CMD ["npm", "start"] defines the default command to execute when the container starts. Step #5:- To do this step, you should be in the same directory as the Dockerfile. Use the docker build command to create your container image, the below command will tell Docker to build your image using the Dockerfile in the current directory. FROM node:alpine WORKDIR /usr/app COPY package*.json ./ RUN npm install COPY . . CMD ["npm", "start"] docker build -t demonetwork.azurecr.io/node-docker-demo:latest .
  • 6. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 6 Figure 9 Build docker image using dockerfile Step #6:- Now we test the login to our docker before, let’s push our image to ACR using the below command, Figure 10 Push the docker Image to ACR docker push demonetwork.azurecr.io/node-docker-demo:latest
  • 7. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 7 Figure 11 Pushing the docker image completed After the command completes successfully, you can head back to the Azure portal to verify that your image is now available in ACR. Figure 12 Verify the command Step #7:- The final step, which is expose the docker application using URL, Azure make this step easy, by creating resource called Web App for containers, to do this just follow the below figures. In the Azure portal, select Create a resource, select Web in the Azure Marketplace, and choose Web App for containers.
  • 8. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 8 Figure 13 Create web app for containers Press on web app for containers Figure 14 Create Web App for containers New page will be open, fill the information, such as the name of instance, will be publish either on Linux or docker container ( our case) , don’t press review + create, press Next: Docker, so you will be able to configure the web app.
  • 9. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 9 Figure 15 Web App Instance details The next screen, which is docker, as you see, I choose “ azure container Registry” and from the drop list, will be appeared our options. Figure 16 web app container configuration Press review creates.
  • 10. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 10 Figure 17 Web App Summary Page Wait for couple of seconds and it will be created. Figure 18 Final Result with URL for the new deployed code As you see if you check the URL and press on it This is the result. https://networktask.azurewebsites.net
  • 11. Build, Deploy and Run Node Js Application on Azure using Docker Osama Mustafa P a g e | 11