This repository was archived by the owner on Feb 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +69
-6
lines changed
Expand file tree Collapse file tree 6 files changed +69
-6
lines changed Original file line number Diff line number Diff line change 1- FROM emscripten/emsdk:3.1.73-arm64
1+ ARG ARCH=
2+ ARG VER=3.1.73
3+ FROM docker.io/emscripten/emsdk:${VER}${ARCH}
24
35RUN apt update && apt-get install -y --no-install-recommends \
46 git \
Original file line number Diff line number Diff line change @@ -16,7 +16,25 @@ Clone the repo and enter the dev environment:
1616
1717``` bash
1818git clone https://github.com/coparse-inc/lok-wasm
19- ./macos-docker
19+ ./in-docker
20+ ```
21+
22+ ## Linux with Podman
23+
24+ Clone the repo and enter the dev environment:
25+
26+ ``` bash
27+ git clone https://github.com/coparse-inc/lok-wasm
28+ ./in-podman
29+ ```
30+
31+ ## Linux with Docker
32+
33+ Clone the repo and enter the dev environment:
34+
35+ ``` bash
36+ git clone https://github.com/coparse-inc/lok-wasm
37+ ./in-docker
2038```
2139
2240## Ubuntu/Debian/Pop_OS!
Original file line number Diff line number Diff line change 11#! /bin/sh
2- docker build -q -t lok-wasm:3.1.73 .
2+ arch=$( uname -m)
3+ emsdk_version=3.1.73
4+
5+ if [[ " $arch " == " arm64" || " $arch " == " aarch64" ]]; then
6+ docker build -t lok-wasm:$emsdk_version --build-arg ARCH=-arm64 --build-arg VER=$emsdk_version .
7+ else
8+ docker build -t lok-wasm:$emsdk_version --build-arg VER=$emsdk_version .
9+ fi
10+ mkdir -p .cache .npm
11+
312exec docker run \
413 --rm \
514 -it \
@@ -12,5 +21,5 @@ exec docker run \
1221 -v $( pwd) /.npm:/.npm:rw \
1322 -u $( id -u) :$( id -g) \
1423 -w / \
15- lok-wasm:3.1.73 \
24+ lok-wasm:$emsdk_version \
1625 bash
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ arch=$( uname -m)
3+ emsdk_version=3.1.73
4+
5+ if [[ " $arch " == " arm64" || " $arch " == " aarch64" ]]; then
6+ podman build -t lok-wasm:$emsdk_version --build-arg ARCH=-arm64 --build-arg VER=$emsdk_version .
7+ else
8+ podman build -t lok-wasm:$emsdk_version --build-arg VER=$emsdk_version .
9+ fi
10+ mkdir -p .cache .npm
11+
12+ exec podman run \
13+ --rm \
14+ -it \
15+ --user 1000:100 \
16+ --userns=keep-id \
17+ -v $( pwd) /libreoffice-core:/home/emscripten/libreoffice-core:Z \
18+ -v $( pwd) /scripts:/home/emscripten/scripts:Z \
19+ -v $( pwd) /VERSION:/home/emscripten/VERSION:Z \
20+ -v $( pwd) /soffice_fccache.data:/home/emscripten/soffice_fccache.data:Z \
21+ -v $( pwd) /soffice_fccache.data.js.metadata:/home/emscripten/soffice_fccache.data.js.metadata:Z \
22+ -v $( pwd) /.cache:/home/emscripten/.cache:Z \
23+ -v $( pwd) /.npm:/home/emscripten/.npm:Z \
24+ -w /home/emscripten \
25+ lok-wasm:$emsdk_version \
26+ bash
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ FCCAHCE_OUT="$BASE_DIR/libreoffice-core/instdir/program/$FCCACHE_FILE"
1010QA_ENV_DIR=" $BASE_DIR /qa-env"
1111
1212# Add emscripten toolchain
13- source " $BASE_DIR /emsdk/emsdk_env.sh"
13+ if [[ " $container " = " podman" ]]; then
14+ source " /emsdk/emsdk_env.sh"
15+ else
16+ source " $SCRIPT_DIR /../emsdk/emsdk_env.sh"
17+ fi
1418cd " $BASE_DIR /libreoffice-core"
1519echo " Building LOK"
1620make || exit 1
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE:-$0}")" &> /dev/null && pwd)
66
77# Add emscripten toolchain
88export EMSDK_QUIET=1
9- source " $SCRIPT_DIR /../emsdk/emsdk_env.sh"
9+ if [[ " $container " = " podman" ]]; then
10+ source " /emsdk/emsdk_env.sh"
11+ else
12+ source " $SCRIPT_DIR /../emsdk/emsdk_env.sh"
13+ fi
1014cd " $SCRIPT_DIR /../libreoffice-core"
1115
1216# LOK requires GCC 12, which often isn't the default, check for gcc-12 and g++12 if necessary
You can’t perform that action at this time.
0 commit comments