Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. FROM gcc:9.3.0 AS BASE
  4. ## set work directory
  5. WORKDIR /root/
  6. COPY resource /root/
  7. ## - download cmake with wget and set up
  8. RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
  9. && tar -zxvf cmake-3.21.1-linux-x86_64.tar.gz \
  10. && rm -f cmake-3.21.1-linux-x86_64.tar.gz \
  11. && mv cmake-3.21.1-linux-x86_64 /opt/cmake \
  12. && ln -s /opt/cmake/bin/cmake /bin/cmake \
  13. && apt-get install make
  14. ## -clone wamr-repo and build iwasm
  15. RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
  16. && cd /root/wasm-micro-runtime/product-mini/platforms/linux \
  17. && mkdir build && cd build \
  18. && cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 && make \
  19. && cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
  20. && rm -fr /root/wasm-micro-runtime
  21. FROM ubuntu:20.04
  22. # COPY files from BASE image
  23. COPY --from=BASE /root/iwasm /root
  24. COPY --from=BASE /root/debug.sh /root
  25. COPY --from=BASE /root/run.sh /root
  26. WORKDIR /root/