Skip to content

Commit

Permalink
Fix docker permissions issue and update containers to bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewLM committed Nov 29, 2023
1 parent 6029bf0 commit 31b0fb5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions coinlib/bin/build_linux.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'docker_util.dart';
/// Build the linux shared library for secp256k1 using the Dockerfile string
String dockerfile = r"""
FROM debian:bullseye
FROM debian:bookworm
# Install dependenices
RUN apt-get update -y \
Expand Down Expand Up @@ -47,7 +47,7 @@ void main() async {
cmd,
dockerfile,
"coinlib_build_secp256k1_linux",
"/secp256k1/output/libsecp256k1.so",
"output/libsecp256k1.so",
)) {
exit(1);
}
Expand Down
4 changes: 2 additions & 2 deletions coinlib/bin/build_wasm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'util.dart';
/// file with the wasm as a Uint8List static variable
String dockerfile = r"""
FROM debian:bullseye
FROM debian:bookworm
# Install dependenices
RUN apt-get update -y \
Expand Down Expand Up @@ -105,7 +105,7 @@ void main() async {
dockerfile,
"coinlib_build_secp256k1_wasm",
tmpDir,
"cp /secp256k1/output/secp256k1.wasm /host/secp256k1.wasm",
"cp output/secp256k1.wasm /host/secp256k1.wasm",
)) {
exit(1);
}
Expand Down
5 changes: 4 additions & 1 deletion coinlib/bin/docker_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ Future<bool> dockerRun(
// Run
print("Running $containerCmd");
exitCode = await execWithStdio(
dockerCmd, ["run", "--volume", "$bindDir:/host", tag, "bash", "-c", containerCmd],
dockerCmd, [
"run", "--rm", "--volume", "$bindDir:/host:Z", tag, "bash", "-c",
containerCmd,
],
);

if (exitCode != 0) {
Expand Down

0 comments on commit 31b0fb5

Please sign in to comment.