执行下面命令启动docker Ubuntu
docker container run -it -p 80:8000 ubuntu
进入Ubuntu容器中
root@6c76b77bfdb4:apt update
root@6c76b77bfdb4:apt install vim xz-utils bzip2 iputils-ping net-tools nginx cmake git python3.10
root@6c76b77bfdb4:update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
root@6c76b77bfdb4:mkdir /home/wasm
root@6c76b77bfdb4:cd /home/wasm
root@6c76b77bfdb4:git clone https://github.com/emscripten-core/emsdk.git
root@6c76b77bfdb4:cd emsdk/
root@6c76b77bfdb4:/home/wasm/emsdk# ./emsdk install latest
root@6c76b77bfdb4:/home/wasm/emsdk# ./emsdk activatelatest
root@6c76b77bfdb4:/home/wasm/emsdk# source ./emsdk_env.sh
root@6c76b77bfdb4:/home/wasm/emsdk# mkdir -p /home/emsdk/test
root@6c76b77bfdb4:/home/wasm/emsdk# cd /home/emsdk/test
root@6c76b77bfdb4:/home/emsdk/test# vim hello .c
emcc hello.c -o hello.html
emrun --no_browser --port 8000 hello.html
标签:6c76b77bfdb4,wasm,Ubuntu,home,docker,root,emsdk
From: https://www.cnblogs.com/simp/p/16776719.html