There are two options to build Smartstore and several ways to build Docker images and containers.
- Open the Smartstore solution in Visual Studio 2022
- Use Release configuration
- (Re)build the solution
- Publish host project Smartstore.Web
Run the build script corresponding with your target platform in the build directory: build.{Platform}.cmd
. The resulting build is placed in the build/artifacts/Community.{Version}.{Platform}/ directory. In addition, a zip archive is automatically created in build/artifacts/.
By default, the build script produces a platform-specific, self-contained application that includes: the ASP.NET runtime and libraries, the Smartstore application, and its dependencies. You can run it on any machine that doesn’t have the .NET runtime installed.
Smartstore uses Nuke (https://nuke.build/) as its build automation solution, which makes it easy to customize the build process by editing the src/Smartstore.Build/Smartstore.Build/Build.cs
file.
When the solution is built, all modules in src/Smartstore.Modules/
are detected, compiled, and placed in the src/Smartstore.Web/Modules/
directory. The application runtime uses this directory as a source from which to dynamically load modules. During development, however, the Modules directory is irrelevant. You can safely delete it at any time.
To create a Docker image run build/dockerize.{Platform}[.nobuild].sh
.
- Creates a Debian Linux base image including the complete ASP.NET runtime.
- Builds the solution.
- Publishes a framework-specific application within the Linux container.
- Installs the native wkhtmltopdf library which is required to generate PDF files.
Much faster, but requires that the application was previously built and is located in build/artifacts/Community.{Version}.linux-x64
.
- Creates a Debian Linux base image including only the ASP.NET runtime dependencies.
- Copies the build artifact.
- Installs wkhtmltopdf native library which is required to generate PDF files.
Requires, that the application was previously built, is located in build/artifacts/Community.{Version}.win-x64
and the Docker engine is running a Windows image.
- Creates a Windows Nano Server base image including only the ASP.NET runtime dependencies.
- Copies the build artifact.
To create a ready-to-run Docker container including a database server run compose.{DbSystem}.sh
.
command | Description |
---|---|
compose.mysql.sh | Creates a composite Docker container including the Smartstore application image and the latest MySql image. |
compose.sqlserver.sh | Creates a composite Docker container including the Smartstore application image and the latest MS SQL Server image. |