Repository: dotnet/dotnet-docker

Issue #907: Using SQLite crashes alpine asp.net core 2.2 (but not 2.1) runtime image with Segmentation Fault (aka silently)
Created: 2019-01-23T15:17:23Z
Steps to reproduce the issue

clone repro repo https://github.com/smuellener/SqliteSegmentationFaultAlpineDetCoreApp2_2.git
dotnet publish -c Release -v n -o ./obj/Docker/publish SqliteTestApp.csproj
docker build -t sqlitetestapp .
docker run -it sqlitetestapp /bin/sh
dotnet SqliteTestApp.dll

Expected behavior
Application runs without Segmentation Fault crash
Actual behavior
Segmentation Fault crash
Additional information

A standard example project from microsoft is used for reproduction: https://docs.microsoft.com/en-us/ef/core/get-started/netcore/new-db-sqlite
Built using Current SDK version (2.2.103)
Does not Segmentation Fault crash when microsoft/dotnet:2.1-aspnetcore-runtime-alpine is used

Output of docker version
Client: Docker Engine - Community
Version:           18.09.1
API version:       1.39
Go version:        go1.10.6
Git commit:        4c52b90
Built:             Wed Jan  9 19:34:26 2019
OS/Arch:           windows/amd64
Experimental:      false
Server: Docker Engine - Community
Engine:
Version:          18.09.1
API version:      1.39 (minimum version 1.12)
Go version:       go1.10.6
Git commit:       4c52b90
Built:            Wed Jan  9 19:41:49 2019
OS/Arch:          linux/amd64
Experimental:     false

Duplicate issue #873: alpine image crashes silently when using asp.net core identity boilerplate project.
Created: 2018-12-31T23:21:30Z
Steps to reproduce the issue

create a project dotnet new webapp --auth Individual -o example_auth
create a dockerfile

FROM microsoft/dotnet:2.2-sdk as builder
WORKDIR /usr/src/app
COPY example_auth.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Debug -o out
RUN dotnet ef database update
RUN cp app.db ./out/
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
WORKDIR /opt/app
RUN mkdir /var/dpkeys
COPY --from=builder /usr/src/app/out ./
ENTRYPOINT ["dotnet", "example_auth.dll"]


run the docker container docker run -p 80:80 example_auth (I turned off https in the project for simplicity)
navigate to the register page and register a user.

Expected behavior
The user is logged in
Actual behavior
the container crashes silently
Additional information (e.g. issue happens only occasionally)
if you drop the alpine tag it works as expected.
Output of docker version
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:51 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     true

Output of docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 151
Server Version: 18.09.0
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 973.8MiB
Name: linuxkit-00155d014b3d
ID: Z3OS:GPOW:VSMR:C2EH:UX3R:PGBC:GDN3:7TII:AZ2O:FSGB:5RUO:KJMD
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 29
 Goroutines: 56
 System Time: 2018-12-31T23:20:09.4980634Z
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

Closing comment (2019-02-01T22:44:23Z): Yes this appears to be a duplicate of #907.