summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker
diff options
context:
space:
mode:
Diffstat (limited to 'fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker')
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile30
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md20
-rw-r--r--fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.bat8
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh9
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh6
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh6
6 files changed, 79 insertions, 0 deletions
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile
new file mode 100644
index 000000000..8165bd5f5
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile
@@ -0,0 +1,30 @@
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+FROM gcc:12.2.0 AS BASE
+
+## set work directory
+WORKDIR /root/
+COPY resource /root/
+
+# hadolint ignore=DL3008
+RUN apt-get update \
+ && apt-get -y install make cmake --no-install-recommends
+
+## -clone wamr-repo and build iwasm
+RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
+ && mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
+
+WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
+RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 \
+ && make \
+ && cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
+ && rm -fr /root/wasm-micro-runtime
+
+FROM ubuntu:22.04
+# COPY files from BASE image
+COPY --from=BASE /root/iwasm /root
+COPY --from=BASE /root/debug.sh /root
+COPY --from=BASE /root/run.sh /root
+
+WORKDIR /root/ \ No newline at end of file
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md
new file mode 100644
index 000000000..b4738e867
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md
@@ -0,0 +1,20 @@
+### Build Docker Image
+
+- Linux
+
+ ```shell
+ ./build_docker_image.sh
+ ```
+
+- Windows
+
+ ```shell
+ ./build_docker_image.bat
+ ```
+
+
+### Resource Details
+
+- `Dockerflie` is the source file to build `wasm-debug-server` docker image
+- `resource/debug.sh` is the script to execute the wasm app in debug mod, will start up the debugger server inside of the `iwasm` and hold to wait for connecting.
+- `resource/run.sh` is the script to execute the wasm app directly.
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.bat b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.bat
new file mode 100644
index 000000000..2861105bd
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.bat
@@ -0,0 +1,8 @@
+@REM Copyright (C) 2019 Intel Corporation. All rights reserved.
+@REM SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+@echo off
+docker build -t wasm-debug-server:1.0 .
+
+@REM delete intermediate docker image
+docker image prune -f \ No newline at end of file
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh
new file mode 100755
index 000000000..6beedd6df
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+docker build -t wasm-debug-server:1.0 .
+
+# delete intermediate docker image
+docker image prune -f
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh
new file mode 100755
index 000000000..48458870f
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh
@@ -0,0 +1,6 @@
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+#!/bin/bash
+TARGET=$1
+./iwasm -g=0.0.0.0:1234 /mnt/build/${TARGET}.wasm \ No newline at end of file
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh
new file mode 100755
index 000000000..4e3acecba
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh
@@ -0,0 +1,6 @@
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+#!/bin/bash
+TARGET=$1
+./iwasm /mnt/build/${TARGET}.wasm \ No newline at end of file