Iot-Telemetry-Simulator icon indicating copy to clipboard operation
Iot-Telemetry-Simulator copied to clipboard

Feature Request: Multi platform build for docker images

Open aguywithcode opened this issue 2 years ago • 1 comments

Please provide us with the following information:

This issue is for a: (mark with an x)

- [] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Running the docker image on Arm64 Architecture (e.g. M1 Mac) does not work

docker run --platform linux/amd64 -it -e "IotHubConnectionString='HostName=HQ-Dev-IoT-Hub.azure-devices.net;SharedAccessKeyName=device;SharedAccessKey=85o1yfMXqxigSMC4nO0OVts0ZerAk2tvqEVUu+gu038='" mcr.microsoft.com/oss/azure-samples/azureiot-telemetrysimulator

Any log messages given by the failure

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.ChangeTokenRegistration1..ctor(Func1 changeTokenProducer, Action1 changeTokenConsumer, TState state) at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func1 changeTokenProducer, Action changeTokenConsumer) at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source) at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider..ctor(JsonConfigurationSource source) at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at IotTelemetrySimulator.Program.<>c.<CreateHostBuilder>b__1_0(IConfigurationBuilder builder) in /src/src/IotTelemetrySimulator/Program.cs:line 23 at Microsoft.Extensions.Hosting.HostingHostBuilderExtensions.<>c__DisplayClass6_0.<ConfigureAppConfiguration>b__0(HostBuilderContext context, IConfigurationBuilder builder) at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() at Microsoft.Extensions.Hosting.HostBuilder.Build() at IotTelemetrySimulator.Program.Main(String[] args) in /src/src/IotTelemetrySimulator/Program.cs:line 12 qemu: uncaught target signal 6 (Aborted) - core dumped

Expected/desired behavior

The simulator should connect to my IoTHub and send the data samples

OS and Version?

macOS Ventura 13.4.1 (m1)

Versions

1.15.0

Mention any other details that might be useful

Can successfully build and run locally and can docker build and push to my ACR repo and successfully pull and run.


Thanks! We'll be in touch soon.

aguywithcode avatar Aug 13 '23 05:08 aguywithcode

Verified it was an emulation issue was able to resolve by using docker buildx to create a multiplatform image

aguywithcode avatar Aug 13 '23 06:08 aguywithcode