Skip to content

Cannot precompile blazor wasm with RunAOTCompilation set to true inside docker #29757

Open
@Toudahl

Description

@Toudahl

Description

I am trying to build a blazor wasm with RunAOTCompilation set to true. Unfortuantely i am getting errors when doing the build inside docker.

Reproduction Steps

Create a new solution, and add the blazor wasm template.
Add <RunAOTCompilation>true</RunAOTCompilation> to the csproj.
Create a docker file next to the sln file - with the following content.

FROM mcr.microsoft.com/dotnet/sdk:7.0.101-alpine3.17-amd64
RUN dotnet workload install wasm-tools
COPY . .
RUN dotnet publish BlazorApp1/BlazorApp1.csproj -c Release -o output

Build the image using the docker cli. docker build -t wasm-build-issue .

Expected behavior

The build completes successfully, without warnings and errors - allowing the output to be used in an other stage of a docker file.

Actual behavior

The docker build generates both warnings and errors.

result.txt

Regression?

No response

Known Workarounds

No response

Configuration

It is running inside the official docker image: mcr.microsoft.com/dotnet/sdk:7.0.101-alpine3.17-amd64

NET sdk 7.0.101
alpine3.17
64 bit

Host:

Distributor ID: Pop
Description: Pop!_OS 22.04 LTS
Release: 22.04
Codename: jammy

64 bit intel cpu

Client: Docker Engine - Community
Version: 20.10.21
API version: 1.41
Go version: go1.18.7
Git commit: baeda1f
Built: Tue Oct 25 18:01:58 2022
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.18.7
Git commit: 3056208
Built: Tue Oct 25 17:59:49 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.12
GitCommit: a05d175400b1145e5e6a735a6710579d181e7fb0
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions