Question: I am trying to push docker image into azure container registries repository using power-shell command as follows:-

```
docker push containerregone.azurecr.io/azure-vote-front:V1

```

it gives me following error

```
unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

```

I have tried to find help related to this using following documentation

<https://learn.microsoft.com/en-us/azure/container-registry/container-registry-faq>
<https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication>

but it gives Azure CLI commands.

I have also tried to do this using following link

[https://stackoverflow.com/questions/50817945/what-is-the-powershell-equivalent-to-az-acr-login#:~:text=There%20is%20no%20single%20powershell,docker%20login%20to%20log%20in](https://stackoverflow.com/questions/50817945/what-is-the-powershell-equivalent-to-az-acr-login#:%7E:text=There%20is%20no%20single%20powershell,docker%20login%20to%20log%20in).

but they are using docker login. i don't have docker login.

My Question :-

1. How can we accomplish this using power-shell without docker login?

Answer: 
To answer this question thoroughly I'd have to write a small book, so I only show a basic case where the code is rendered client-side. I also assume that you know how to transpile jsx to js, so I'll treat all react files as already transpiled (that is all `<>` are converted to `React.createElement()`).

First, you have to create a route that will be handled by react (`/groups`), (I assume that you'll use some data for the rendering as in your example):

```
router.get("groups/:name&:term", function(req, res) {
    Groups.find({ groupName: req.params.name, courseTerm: req.params.term }).populate("students")
    .exec(function(err, foundGroup) {
        if (err) {
            console.log(err);
        } else {
            // here will be the react rendering code        
        }
    });
});

```

Assuming that you have react code in `index.js`, you have to add it to the html code as well as data required by the app:

```
router.get("groups/:name&:term", function(req, res) {
    Groups.find({ groupName: req.params.name, courseTerm: req.params.term }).populate("students")
    .exec(function(err, foundGroup) {
        if (err) {
            console.log(err);
        } else {
            res.send(`<html>
               <head>
                 <script>
                   const initialData=${JSON.stringify(foundGroup)};
                 </script>
               </head>
               <body>
                 <div id="react-root"></div>
                 <script src="index.js"></script>
               </body>
            </html>`);

        }
    });
});

```

Your `App` should consume the data like this:

```
React.render(<App initialData={initialData}/>, document.getElementById("react-root");

```

This should get your react code up and running. Going further, you can use `react-dom/server` to prerender html on the server, and mix-in ejs file as a template in which you inject react code to utilize your existing codebase.
Reactjs component can be part of your backend code when using [SSR](https://reactjs.org/docs/react-dom-server.html)(server side rendering) which is much more complicated. Or you can use a express static server to serve reactjs app which is ready to deploy, then express will only be a simple the static file router.