Skip to content

Add support for ARM based Mac M1Β #25

@coroiu

Description

@coroiu

Dockerfile currently uses an amd64 image. On Mac docker uses qemu to emulate the containers, but doesn't seem to have support for file system watching. At least that's my understanding from google this issue, see docker/for-mac#5328

Tested fix

Changing the dockerfile to use mcr.microsoft.com/dotnet/aspnet:5.0.0-buster-slim-arm64v8 fixes the issues. However YubiHSM2 does not have support for a Debian 10 ARM based OS. Could probably be solved using another .Net image.

Configuration used

      keyConnectorSettings__webVaultUri: https://localhost:8081
      keyConnectorSettings__identityServerUri: http://localhost:33657
      keyConnectorSettings__database__provider: json
      keyConnectorSettings__database__jsonFilePath: /config/database_docker.json
      keyConnectorSettings__rsaKey__provider: certificate
      keyConnectorSettings__certificate__provider: filesystem
      keyConnectorSettings__certificate__filesystemPath: /config/bwkc.pfx
      keyConnectorSettings__certificate__filesystemPassword: "{Password}"

Error message

Unhandled exception. System.IO.IOException: Function not implemented
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Bit.KeyConnector.Program.Main(String[] args) in /home/runner/work/key-connector/key-connector/src/KeyConnector/Program.cs:line 11
qemu: uncaught target signal 6 (Aborted) - core dumped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions