DEV Community

Cover image for Pushing my fullstack app image to Azure Container Registry and Deploying using Container Instance and AppService.
emmilly immaculate
emmilly immaculate

Posted on

Pushing my fullstack app image to Azure Container Registry and Deploying using Container Instance and AppService.

I have learnt alot, really.Recently,my cloud mentor said developers usually push and pull their images to a centralised repository.

So i thought of pushing my generated image to an azure repository and try deploying my app from there.

First ofcos i had to set up an azure registry to hold my repository that holds the image.

azurereg

Next, i left everything as default and created the registry.

reg

So creating the registry,under access keys
we should be able to see the registry name, loginserver name and be sure to enable the admin user to passwords.

keys

Now back to our app,i then tag my image
docker tag nameofimage loginserver/nameofimage

 docker tag node_mssql emmilyreg256.azurecr.io/node_mssql
Enter fullscreen mode Exit fullscreen mode

docker

Before we login, we have to login using the admin details in the access keys in the registry.

docker login {loginserver}
Enter fullscreen mode Exit fullscreen mode

Then enter the username and password

docker

Next its time to push the image to the registry
docker push loginservername/nameofimage

docker push emmilyreg256.azurecr.io/node_mssql
Enter fullscreen mode Exit fullscreen mode

after

So after pushing , we can see our image in the docker registry in the portal.

portal

image

Now what do to with this image. Leme check the slides and do something cool next.

im

Turns out i can either run the instance or create a web app.
First i tried creating a web app.
So clicking create webapp leads me to where i can fill details of the web app

webapp

Next we add the database connection string, be sure to include your password in the string.

I

After saving, then check the domain link for the web app.
It should be up and running.

web app

Now if i try creating the instance,
i click on run instance

run

Remember to use the port number that you exposed when building the docker files your tcp.

repo

After deploying,pick the public ip address an add your port to see the website.

public

So now i can create images, push them to registry and deploy them using container instances.

Wow i can't believe this.

Top comments (0)