CultureInfo.GetCultures(CultureTypes.AllCultures)FROM microsoft/dotnet:2.1-aspnetcore-runtime-alpine AS base
WORKDIR /app
EXPOSE 80 5000
FROM microsoft/dotnet:2.1-sdk-alpine AS build
WORKDIR /src
COPY CultureTest/CultureTest.csproj CultureTest/
RUN dotnet restore CultureTest/CultureTest.csproj
COPY . .
WORKDIR /src/CultureTest
RUN dotnet build CultureTest.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish CultureTest.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "CultureTest.dll"]
A list of installed cultures
An empty list
docker versionClient:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: true
docker infoContainers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 37
Server Version: 18.03.1-ce
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 logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.87-linuxkit-aufs
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: linuxkit-00155db29d0f
ID: 5HYC:PU25:4SOG:EHA5:THHC:IVLC:K2OK:DJUG:O356:MTIX:6WIJ:3EJS
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 48
Goroutines: 86
System Time: 2018-05-09T08:39:38.5427872Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Possibly related to https://github.com/gliderlabs/docker-alpine/issues/144
As noted, this is a larger Alpine issue that is not specific to the microsoft/dotnet alpine images. There is nothing we would do to fix this in microsoft/dotnet.
It seems, https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.alpine-x64-globalization contains a workaround.
@cypressious - see Build and run the sample for Alpine with Docker for the background on this.
When you try to get a specific culture you also get no exception, instead you just get the invariant culture.
Most helpful comment
It seems, https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.alpine-x64-globalization contains a workaround.