aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-28 10:50:44 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-28 10:50:44 +0200
commit08d524292beed48d8a383acaee96f68cb2bd1cab (patch)
tree7731c8964e9a95483968ee4cffb501b4e033c425
parentf45330a006a019b6892094a9cb734dd497add7c0 (diff)
downloadnissy-core-08d524292beed48d8a383acaee96f68cb2bd1cab.tar.gz
nissy-core-08d524292beed48d8a383acaee96f68cb2bd1cab.zip
Changes to docker images
Diffstat (limited to '')
-rwxr-xr-xcontainer-run.sh31
1 files changed, 25 insertions, 6 deletions
diff --git a/container-run.sh b/container-run.sh
index 6865e32..23f1fbf 100755
--- a/container-run.sh
+++ b/container-run.sh
@@ -7,8 +7,13 @@
7# ./container-run.sh arm ./build test 7# ./container-run.sh arm ./build test
8# 8#
9# builds nissy and runs the unit tests in an ARM container. 9# builds nissy and runs the unit tests in an ARM container.
10# The container images are based on Debian Linux, see Dockerfile for details. 10#
11# The images are built with a tag starting with 'localhost/nissy/'. 11# The containers are based on Alpine Linux and the contain the necessary tools
12# to build the main library and the C++ and Python examples. They DO NOT
13# contain the emscripten compiler, so they cannot be used to build the web
14# version (e.g. ./build web or ./buidl webtest).
15# The images are given a tag starting with 'localhost/nissy/'.
16#
12# See below for a list of options. 17# See below for a list of options.
13 18
14usage() { 19usage() {
@@ -45,13 +50,27 @@ arm|arm64)
45 ;; 50 ;;
46esac 51esac
47 52
53image="localhost/nissy/alpine-$p"
48platform="--platform=linux/$p" 54platform="--platform=linux/$p"
49image="localhost/nissy/debian-$p" 55mount="--mount type=bind,src=./,dst=/nissy-core"
56flags="--rm --privileged"
57
58dockerfile="$(mktemp)"
59cat > "$dockerfile" << EOF
60FROM alpine:3.22.1
61RUN apk update
62RUN apk add gcc g++ clang python3 python3-dev
63#COPY . ./nissy-core
64RUN mkdir /nissy-core
65WORKDIR /nissy-core
66USER 1000:1000
67EOF
50 68
51docker build "$platform" -t "$image" . 69docker build "$platform" -f "$dockerfile" -t "$image" .
70rm "$dockerfile"
52 71
53if [ -z "$2" ]; then 72if [ -z "$2" ]; then
54 docker run --rm "$platform" -it "$image" /bin/sh 73 docker run $flags $mount "$platform" -it "$image" /bin/sh
55else 74else
56 docker run --rm "$platform" -t "$image" $@ 75 docker run $flags $mount "$platform" -t "$image" $@
57fi 76fi

Generated with cgit - Back to sebastiano.tronto.net