Updated 03. Setting the eShopOnContainers solution up in a Windows CLI environment (dotnet CLI, Docker CLI and VS Code) (markdown)
parent
60bd00919d
commit
d87f636f25
@ -172,7 +172,26 @@ It should end with something like the following screenshot:
|
||||
|
||||
At this point you have the .NET bits ready. Now, create the Docker images and run the containers.
|
||||
|
||||
### Build Images and Deploy containers into your Docker host
|
||||
If you had issues when trying to build your .NET Core binaries with the build-container, because of the mentioned issue/bug above, then try this second choice: Option B.
|
||||
|
||||
# Option B. Approach building bits from your local Windows dev-machine by using CLI scripts
|
||||
|
||||
Although using the build container is the recommended approach, we provide powershell scripts for using directly from windows CLI. You can find them in `/cli-windows` folder:
|
||||
|
||||
. `build-bits.ps1`: Build all projects and left them published in /obj/Docker/publish. This is more or less the same that using the build container does.
|
||||
. `build-images.ps1`: Build all Docker images. **Images are tagged using the git branch you were when this script is running**. That allows you have docker images for various branches at same time. You can use the parameter `-imageTag myTag` to force use a specific `myTag`.
|
||||
. `delete-images.ps1`: Removes all eShop docker images. Other images used by eShop, but downloaded directly from DockerHub (like sql server) aren't deleted.
|
||||
|
||||
So for building all projects using the CLI:
|
||||
|
||||
```
|
||||
cd cli-windows
|
||||
.\build-bits.ps1
|
||||
```
|
||||
|
||||
This script will **compile and publish all your projects and then delete all docker images**. When this script finishes you should have all projects compiled and no docker images. Then you can run `.\build-images.ps1` to rebuild the Docker images.
|
||||
|
||||
# Build the Docker Images and deploy the containers into Docker
|
||||
|
||||
You can build the Docker images and deploy the containers to a regularDocker host by using the Docker CLI tool `docker-compose up` which is very convenient for multi-container applications as it can build all the Docker images for you and then spin-up all the multiple containers of your application, all with a single command.
|
||||
If you don't want to deploy the containers but only build the images, you can do so by running `docker-compose build`
|
||||
@ -208,23 +227,6 @@ When running `docker-compose up` you should see something similar to the followi
|
||||
You might have additional images, but at least, you should see the following list of images which are 6 custom images starting with the prefix "eshop" which is the name of the image repo. The rest of the images that are not starting with "eshop" will probably be official base-images like the microsoft/aspnetcore or the SQL Server for Linux images.
|
||||
|
||||
|
||||
# Option B. Approach building bits from your local Windows dev-machine by using CLI scripts
|
||||
|
||||
Althought using the build container is the recommended approach, we provide powershell scripts for using directly from windows CLI. You can find them in `/cli-windows` folder:
|
||||
|
||||
. `build-bits.ps1`: Build all projects and left them published in /obj/Docker/publish. This is more or less the same that using the build container does.
|
||||
. `build-images.ps1`: Build all Docker images. **Images are tagged using the git branch you were when this script is running**. That allows you have docker images for various branches at same time. You can use the parameter `-imageTag myTag` to force use a specific `myTag`.
|
||||
. `delete-images.ps1`: Removes all eShop docker images. Other images used by eShop, but downloaded directly from DockerHub (like sql server) aren't deleted.
|
||||
|
||||
So for building all projects using the CLI:
|
||||
|
||||
```
|
||||
cd cli-windows
|
||||
.\build-bits.ps1
|
||||
```
|
||||
|
||||
This script will **compile and publish all your projects and then delete all docker images**. When this script finishes you should have all projects compiled and no docker images. Then you can run `.\build-images.ps1` to rebuild the Docker images.
|
||||
|
||||
### Test the MVC Web app
|
||||
Open a browser and type `http://localhost:5100/` and hit enter.
|
||||
You should see the MVC application like in the following screenshot:
|
||||
|
Loading…
x
Reference in New Issue
Block a user