Docker container: resource not found

Vote:
 

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.

#315408
Jan 10, 2024 14:03
Vote:
 

App_Data was missing.

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.

#315462
Jan 11, 2024 15:23
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.