Dockerfile 947 B

123456789101112131415161718192021222324252627282930
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. FROM gcc:12.2.0 AS BASE
  4. ## set work directory
  5. WORKDIR /root/
  6. COPY resource /root/
  7. # hadolint ignore=DL3008
  8. RUN apt-get update \
  9. && apt-get -y install make cmake --no-install-recommends
  10. ## -clone wamr-repo and build iwasm
  11. RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
  12. && mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
  13. WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
  14. RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 \
  15. && make \
  16. && cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
  17. && rm -fr /root/wasm-micro-runtime
  18. FROM ubuntu:22.04
  19. # COPY files from BASE image
  20. COPY --from=BASE /root/iwasm /root
  21. COPY --from=BASE /root/debug.sh /root
  22. COPY --from=BASE /root/run.sh /root
  23. WORKDIR /root/