atsign-company / at_dockerfiles

Dockerfiles to create build, run and test images for Dart applications across multiple architectures.
Apache License 2.0
3 stars 2 forks source link

fix: Install libatomic1 and copy library to runtime #124

Closed cpswan closed 1 year ago

cpswan commented 1 year ago

libatomic.so.1 might have been dropped from the base image, but dart compile exe still needs it:

 > [linux/riscv64 build 4/4] RUN dart compile exe /app/showplatform.dart -o /app/dartshowplatform:
0.221 dart: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
------
./dartshowplatform/Dockerfile:4
--------------------
   2 |     WORKDIR /app
   3 |     COPY ./dartshowplatform/showplatform.dart .
   4 | >>> RUN dart compile exe /app/showplatform.dart -o /app/dartshowplatform
   5 |     
   6 |     FROM scratch
--------------------
ERROR: failed to solve: process "/bin/sh -c dart compile exe /app/showplatform.dart -o /app/dartshowplatform" did not complete successfully: exit code: 127
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c dart compile exe /app/showplatform.dart -o /app/dartshowplatform" did not complete successfully: exit code: 127

- What I did

Reinstated libatomic.so.1 to \runtime

- How I did it

The Dockerfile.RV64 now adds libatomic1 to the list of apt-get install

- How to verify it

Run workflow_dispatch on the AutoBuildAll workflow

- Description for the changelog

fix: Install libatomic1 and copy library to runtime