

If the output displays "Authentication required", run az acr login -name in the terminal. The target registry is determined by the registry specified in the image name. The Terminal panel shows the docker push commands used for this operation. Accept the tag for that image by pressing Enter. The newly tagged image appears now as a new node in Docker explorer, under Images and includes the registry name such as /jse2eexpressserver.Įxpand that node, right-click latest, and select Push. Open the Command Palette ( F1) and run Docker Images: Build Image to build the image. If you build on Linux or macOS, refer to this build issue.Īs a final step, rebuild so you have the image tagged with your registry. vscode/tasks.json.įind the task with the type docker-build.Īdd the tag property, using your registry name (YOUR-REGISTRY-NAME), in the dockerBuild property: /Dockerfile",

Change the build task to always build with your Azure registry name. To push the image to your registry, you must first tag it with the registry name. Once built, the image appears in the Docker Explorer under Images, named jse2eexpressserver. The output also shows each step, or layer, that makes up the app environment. Once completed, the Terminal panel of Visual Studio Code opens to run the docker build command. VS Code uses the Dockerfile in the current folder and gives the image the same name as the current folder. The Dockerfile describes the environment for your app including the location of the source files and the command to start the app within a container. The command creates a Dockerfile along with some configuration files for Docker compose and a. In Visual Studio Code, open the Command Palette ( F1), type add docker files to workspace, then select the Docker: Add Docker files to workspace command.Īnswer the prompts with the following values: Prompt

In this step, create the image from the local Express.js app.
