diff options
Diffstat (limited to '')
| -rw-r--r-- | Dockerfile | 26 | ||||
| -rwxr-xr-x | container-run.sh | 8 |
2 files changed, 22 insertions, 12 deletions
| @@ -7,13 +7,23 @@ | |||
| 7 | # | 7 | # |
| 8 | # docker run --platform=linux/arm64 -t localhost/nissy-dev/arm ./build test | 8 | # docker run --platform=linux/arm64 -t localhost/nissy-dev/arm ./build test |
| 9 | 9 | ||
| 10 | # TODO: add C++ compiler, emscripten | 10 | FROM debian:12 |
| 11 | 11 | ||
| 12 | FROM alpine:3.22.1 | 12 | # Install necessary packages |
| 13 | RUN apk update && apk add \ | 13 | RUN apt update |
| 14 | gcc \ | 14 | RUN apt install --yes xz-utils git gcc g++ clang python3 python3-dev |
| 15 | clang \ | ||
| 16 | python3 \ | ||
| 17 | python3-dev | ||
| 18 | 15 | ||
| 19 | COPY . ./ | 16 | # Install emscripten. |
| 17 | RUN git clone https://github.com/emscripten-core/emsdk.git | ||
| 18 | WORKDIR /emsdk | ||
| 19 | RUN ./emsdk install 4.0.11 | ||
| 20 | RUN ./emsdk activate 4.0.11 | ||
| 21 | ENV EMSDK="/emsdk" | ||
| 22 | ENV EMSDK_NODE_BIN="$EMSDK/node/22.16.0_64bit/bin" | ||
| 23 | ENV EMSDK_NODE="$EMSDK_NODE_BIN/node" | ||
| 24 | ENV PATH="$EMSDK:$EMSDK/upstream/emscripten:$EMSDK_NODE_BIN:$PATH" | ||
| 25 | |||
| 26 | # Copying the nissy-core repository and switching to that folder. | ||
| 27 | WORKDIR / | ||
| 28 | COPY . ./nissy-core | ||
| 29 | WORKDIR /nissy-core | ||
diff --git a/container-run.sh b/container-run.sh index 9799f65..6865e32 100755 --- a/container-run.sh +++ b/container-run.sh | |||
| @@ -7,7 +7,7 @@ | |||
| 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 Alpine Linux, see Dockerfile for details. | 10 | # The container images are based on Debian Linux, see Dockerfile for details. |
| 11 | # The images are built with a tag starting with 'localhost/nissy/'. | 11 | # The images are built with a tag starting with 'localhost/nissy/'. |
| 12 | # See below for a list of options. | 12 | # See below for a list of options. |
| 13 | 13 | ||
| @@ -46,12 +46,12 @@ arm|arm64) | |||
| 46 | esac | 46 | esac |
| 47 | 47 | ||
| 48 | platform="--platform=linux/$p" | 48 | platform="--platform=linux/$p" |
| 49 | image="localhost/nissy/alpine-$p" | 49 | image="localhost/nissy/debian-$p" |
| 50 | 50 | ||
| 51 | docker build "$platform" -t "$image" . | 51 | docker build "$platform" -t "$image" . |
| 52 | 52 | ||
| 53 | if [ -z "$2" ]; then | 53 | if [ -z "$2" ]; then |
| 54 | docker run "$platform" -it "$image" /bin/sh | 54 | docker run --rm "$platform" -it "$image" /bin/sh |
| 55 | else | 55 | else |
| 56 | docker run "$platform" -t "$image" $@ | 56 | docker run --rm "$platform" -t "$image" $@ |
| 57 | fi | 57 | fi |
