I have a VS project, that is building a minimal api using docker-compose. On the dev system (windows) I can build the api and using docker-compose I can debug it. It works just fine.
In the dockerfile I specified arm64 for the build and also the compose file specifies arm64 as platform.
So far so good.
So I know the image works. I then upload the image to my private docker hub. I can see there it is arm64 based.
Then on the raspberry pi I pull this image from the hub and start the container specifying the port .
But the container immediately exits. And that is how far I can get, I have no idea how I can find out why it exited.
I do have the result of the inspect of the container, any help appreciated:
[
{
"Id": "5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66",
"Created": "2024-08-02T13:42:35.692081019Z",
"Path": "bash",
"Args": [],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-08-02T13:42:36.430129355Z",
"FinishedAt": "2024-08-02T13:42:36.64306985Z"
},
"Image": "sha256:c1726dd2236149d599f69c57d275a2288cf3d4145b10f08b060734f056c980d3",
"ResolvConfPath": "/var/lib/docker/containers/5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66/hostname",
"HostsPath": "/var/lib/docker/containers/5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66/hosts",
"LogPath": "/var/lib/docker/containers/5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66/5f27dbf7c4aee939928aca9cb4cd11489284fac017da9bff02e4ece1c56f2f66-json.log",
"Name": "/bushbaristavoucher",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "bridge",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "",
"HostPort": "8080"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
37,
144
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/fa3f40b30ac2409af58c0f4aae70719558eac747b975ad4245ff52fef5c73e6a-init/diff:/var/lib/docker/overlay2/9f0f93e886b1e7e2bcfa29e8ddcb28670868f7667fff2e621bce413172b05c06/diff:/var/lib/docker/overlay2/52ece62355ba4fd72d21768f01a8ee7df776f3bd9323076dcbb67500333adf6a/diff:/var/lib/docker/overlay2/0cc7ae5d5376f120e6f8e4022b7627cb9d391ededb485ce5f7c204e9a132b5fb/diff:/var/lib/docker/overlay2/a404189cbce1f5abbbd7eb1b307c37289bc4b850cf7523cd19a029489c34050f/diff:/var/lib/docker/overlay2/815a55da1f3aa749db901f1fc8bbed6522e2380869fa2fccd3195c482f3dc5b5/diff:/var/lib/docker/overlay2/de125ef33bb1d1d4b11a95e59112545e8c0d15a9a2e4a11f557d6c9e3bd227ee/diff:/var/lib/docker/overlay2/5d6b68352326f52d8254ffb5e9f1e0e0921271429512ae73605f84cae9227ca5/diff",
"MergedDir": "/var/lib/docker/overlay2/fa3f40b30ac2409af58c0f4aae70719558eac747b975ad4245ff52fef5c73e6a/merged",
"UpperDir": "/var/lib/docker/overlay2/fa3f40b30ac2409af58c0f4aae70719558eac747b975ad4245ff52fef5c73e6a/diff",
"WorkDir": "/var/lib/docker/overlay2/fa3f40b30ac2409af58c0f4aae70719558eac747b975ad4245ff52fef5c73e6a/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "5f27dbf7c4ae",
"Domainname": "",
"User": "app",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"APP_UID=1654",
"ASPNETCORE_HTTP_PORTS=8080",
"DOTNET_RUNNING_IN_CONTAINER=true",
"DOTNET_VERSION=8.0.7",
"ASPNET_VERSION=8.0.7"
],
"Cmd": [
"bash"
],
"Image": "bushbaristavoucher:latest",
"Volumes": null,
"WorkingDir": "/app",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.project": "dockercompose11230938145253305087",
"com.docker.compose.service": "bushbaristavoucher",
"com.docker.compose.version": "2.29.1",
"com.microsoft.created-by": "visual-studio",
"com.microsoft.visual-studio.project-name": "BushBaristaVoucher"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "",
"SandboxKey": "",
"Ports": {},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"MacAddress": "",
"DriverOpts": null,
"NetworkID": "0301cecca7ea00512dbb68f52fc9318cc98c1b043705afb857a0dd2eba56d713",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": null
}
}
}
}
]