First I created an empty database named [Test] on my local MSSQL instance.
Then create sample project, publish image and run container:
# Install latest templates (version 1.7.1 as of this post)
dotnet new install EPiServer.Templates
# Create sample project
dotnet new epi-alloy-mvc --name EPiTest --output .
# Build and publish docker image
dotnet publish --os linux --arch x64 -p PublishProfile=DefaultContainer -c Release -p ContainerImageTags='"0.4.0;latest"'
# Start docker container on port 5000 (http)
docker run -p 5000:5000 -e Logging__LogLevel__EPiServer=Information -e ConnectionStrings__EPiServerDB="Server=host.docker.internal;Initial Catalog=Test;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;user=docker;password=dockertest;" -e ASPNETCORE_URLS="http://+:5000" epitest:0.4.0
At this point the database is initialized. Navigating to http://localhost:5000/ prompts me to add an Admin user. So far so good.
However, as soon as I try using the site all I get are 404s:
I then terminated the container and ran the project from VS. Now it works... Relaunch the container and I start seeing pages, but it is not loading any images.
I mounted that with my docker image and I finally have something that runs! On a sidenote: I believe writeable mounts are broken in Windows, so I copied App_Data to my WSL2 Ubuntu instance and launched the container from there.
First I created an empty database named [Test] on my local MSSQL instance.
Then create sample project, publish image and run container:
At this point the database is initialized. Navigating to http://localhost:5000/ prompts me to add an Admin user. So far so good.
However, as soon as I try using the site all I get are 404s:
I then terminated the container and ran the project from VS. Now it works... Relaunch the container and I start seeing pages, but it is not loading any images.