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.
Next, i left everything as default and created the registry.
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.
Now back to our app,i then tag my image
docker tag nameofimage loginserver/nameofimage
docker tag node_mssql emmilyreg256.azurecr.io/node_mssql
Before we login, we have to login using the admin details in the access keys in the registry.
docker login {loginserver}
Then enter the username and password
Next its time to push the image to the registry
docker push loginservername/nameofimage
docker push emmilyreg256.azurecr.io/node_mssql
So after pushing , we can see our image in the docker registry in the portal.
Now what do to with this image. Leme check the slides and do something cool next.
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
Next we add the database connection string, be sure to include your password in the string.
After saving, then check the domain link for the web app.
It should be up and running.
Now if i try creating the instance,
i click on run instance
Remember to use the port number that you exposed when building the docker files your tcp.
After deploying,pick the public ip address an add your port to see the website.
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)